Skip to main content

FromResponse

Trait FromResponse 

Source
pub trait FromResponse<R = ClientResponse>: Sized {
    // Required method
    fn from_response(
        res: R,
    ) -> impl Future<Output = Result<Self, ServerFnError>>;
}
Available on crate feature fullstack only.

Required Methods§

Source

fn from_response(res: R) -> impl Future<Output = Result<Self, ServerFnError>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<A, B> FromResponse for (A, B)

Source§

impl<A, B, C> FromResponse for (A, B, C)

Implementors§

Source§

impl FromResponse for Response<Body>

Implementation of FromResponse for axum::response::Response.

This allows converting a ClientResponse (from a client-side HTTP request) into an axum::Response for server-side handling. The response’s status, headers, and body are transferred from the client response to the axum response.

Source§

impl FromResponse for FileStream

Source§

impl FromResponse for NoContent

Source§

impl FromResponse for Redirect

Source§

impl FromResponse for Streaming

Source§

impl FromResponse for Streaming<Bytes>

Source§

impl<A> FromResponse for A

Source§

impl<T> FromResponse for Html<T>
where T: From<String>,

Source§

impl<T> FromResponse for Json<T>

Source§

impl<T> FromResponse for ServerEvents<T>

Source§

impl<T> FromResponse for Text<T>
where T: From<String>,

Source§

impl<T, E> FromResponse for Streaming<T, E>
where T: DeserializeOwned + Serialize + 'static + Send, E: Encoding,