pub trait FromRequest {
// Required method
fn from_request(req: Request) -> Result<Self, ErrorCode>
where Self: Sized;
}Available on crate feature
wasip3-unstable only.Expand description
A trait for constructing a value from a wasip3::http::types::Request.
This is the inverse of IntoRequest, allowing higher-level request
types to be built from standardized WASI HTTP requests—for example,
to parse structured payloads, extract query parameters, or perform
request validation.
§See also
IntoRequest: Converts a type into awasip3::http::types::Request.
Required Methods§
Sourcefn from_request(req: Request) -> Result<Self, ErrorCode>where
Self: Sized,
fn from_request(req: Request) -> Result<Self, ErrorCode>where
Self: Sized,
Attempts to construct Self from a wasip3::http::types::Request.