1
0
Fork 0
ruma/crates/ruma-common/tests/it/api/ui/serde-flatten-response-body.stderr
Kévin Commaille 62363122f7 client-api: Merge Error into ruma_common::api::Error
All Matrix endpoint errors should use the same format in theory, and
this type supports other response error formats anyway.
2026-04-05 11:11:56 +02:00

47 lines
2.1 KiB
Text

error: Use `#[ruma_api(body)]` to represent the JSON body as a single field
--> tests/it/api/ui/serde-flatten-response-body.rs:28:5
|
28 | / #[serde(flatten)]
29 | | pub foo: CustomResponseBody,
| |_______________________________^
error[E0277]: the trait bound `Response: IncomingResponse` is not satisfied
--> tests/it/api/ui/serde-flatten-response-body.rs:23:1
|
23 | #[request]
| ^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `IncomingResponse` is not implemented for `Response`
--> tests/it/api/ui/serde-flatten-response-body.rs:27:1
|
27 | pub struct Response {
| ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ruma_common::api::OutgoingRequest::IncomingResponse`
--> src/api.rs
|
| type IncomingResponse: IncomingResponse<EndpointError = Self::EndpointError>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `OutgoingRequest::IncomingResponse`
= note: this error originates in the derive macro `::ruma_common::exports::ruma_macros::Request` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Response: OutgoingResponse` is not satisfied
--> tests/it/api/ui/serde-flatten-response-body.rs:23:1
|
23 | #[request]
| ^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `OutgoingResponse` is not implemented for `Response`
--> tests/it/api/ui/serde-flatten-response-body.rs:27:1
|
27 | pub struct Response {
| ^^^^^^^^^^^^^^^^^^^
help: the trait `OutgoingResponse` is implemented for `ruma_common::api::error::Error`
--> src/api/error.rs
|
| impl OutgoingResponse for Error {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ruma_common::api::IncomingRequest::OutgoingResponse`
--> src/api.rs
|
| type OutgoingResponse: OutgoingResponse;
| ^^^^^^^^^^^^^^^^ required by this bound in `IncomingRequest::OutgoingResponse`
= note: this error originates in the derive macro `::ruma_common::exports::ruma_macros::Request` (in Nightly builds, run with -Z macro-backtrace for more info)