Struct ruma_api::error::MatrixError [−][src]
pub struct MatrixError {
pub status_code: StatusCode,
pub body: JsonValue,
}Expand description
A general-purpose Matrix error type consisting of an HTTP status code and a JSON body.
Note that individual ruma-*-api crates may provide more specific error types.
Fields
status_code: StatusCodeThe http response’s status code.
body: JsonValueThe http response’s body.
Trait Implementations
fn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>
) -> Result<Self, ResponseDeserializationError>
fn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>
) -> Result<Self, ResponseDeserializationError>Tries to construct Self from an http::Response. Read more
Tries to convert this response into an http::Response. Read more
Auto Trait Implementations
impl RefUnwindSafe for MatrixErrorimpl Send for MatrixErrorimpl Sync for MatrixErrorimpl Unpin for MatrixErrorimpl UnwindSafe for MatrixErrorBlanket Implementations
Mutably borrows from an owned value. Read more