FromRequest

Trait FromRequest 

Source
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

Required Methods§

Source

fn from_request(req: Request) -> Result<Self, ErrorCode>
where Self: Sized,

Attempts to construct Self from a wasip3::http::types::Request.

Implementations on Foreign Types§

Source§

impl FromRequest for Request<IncomingBody<Request>>

Implementors§

Source§

impl FromRequest for spin_sdk::http_wasip3::wasip3::http::types::Request