pub trait FromResponse<R = ClientResponse>: Sized {
// Required method
fn from_response(
res: R,
) -> impl Future<Output = Result<Self, ServerFnError>>;
}Required Methods§
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)where
A: FromResponseParts,
B: FromResponse,
impl<A, B> FromResponse for (A, B)where
A: FromResponseParts,
B: FromResponse,
fn from_response( res: ClientResponse, ) -> impl Future<Output = Result<Self, ServerFnError>>
Source§impl<A, B, C> FromResponse for (A, B, C)
impl<A, B, C> FromResponse for (A, B, C)
fn from_response( res: ClientResponse, ) -> impl Future<Output = Result<Self, ServerFnError>>
Implementors§
impl FromResponse for FileStream
impl FromResponse for Streaming<Bytes>
impl FromResponse for Streaming<String>
impl FromResponse for NoContent
impl FromResponse for Redirect
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.