Skip to main content

IncomingResponse

Trait IncomingResponse 

Source
pub trait IncomingResponse: Sized {
    type EndpointError: EndpointError;

    // Required method
    fn try_from_http_response_inner(
        response: Response<&[u8]>,
    ) -> Result<Self, DeserializationError>;
}
Available on crate feature api only.
Expand description

A response type for a Matrix API endpoint, used for receiving responses.

Required Associated Types§

Source

type EndpointError: EndpointError

A type capturing the expected error conditions the server can return.

Required Methods§

Source

fn try_from_http_response_inner( response: Response<&[u8]>, ) -> Result<Self, DeserializationError>

Tries to convert the given http::Response into this response type.

Only called for successful responses (HTTP status code < 400).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§