FromResponse

Trait FromResponse 

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

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§

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

Source§

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

Source§

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

Implementors§

Source§

impl FromResponse for FileStream

Source§

impl FromResponse for Streaming<Bytes>

Source§

impl FromResponse for Streaming<String>

Source§

impl FromResponse for NoContent

Source§

impl FromResponse for Redirect

Source§

impl FromResponse for Response

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<A> FromResponse for A

Source§

impl<T> FromResponse for ServerEvents<T>

Source§

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

Source§

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

Source§

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

Source§

impl<T: DeserializeOwned> FromResponse for Json<T>