pub trait FromResponse {
// Required method
fn from_response(response: Response) -> Result<Self, ErrorCode>
where Self: Sized;
}Expand description
A trait for constructing a value from a wasip3::http::types::Response.
This is the inverse of IntoResponse, allowing higher-level response
types to be derived from standardized WASI HTTP responses—for example,
to deserialize JSON payloads or map responses to domain-specific types.
§See also
IntoResponse: Converts a type into awasip3::http::types::Response.
Required Methods§
Sourcefn from_response(response: Response) -> Result<Self, ErrorCode>where
Self: Sized,
fn from_response(response: Response) -> Result<Self, ErrorCode>where
Self: Sized,
Attempts to construct Self from a wasip3::http::types::Response.