Skip to main content

IntoRequest

Trait IntoRequest 

Source
pub trait IntoRequest {
    // Required method
    fn into_request(self) -> Result<Request, ErrorCode>;
}
Expand description

A trait for any type that can be converted into a wasip3::http::types::Request.

This trait provides a unified interface for adapting user-defined request types into the lower-level wasip3::http::types::Request format used by the WASI HTTP subsystem.

Implementing IntoRequest allows custom builders or wrapper types to interoperate seamlessly with APIs that expect standardized WASI HTTP request objects.

§See also

Required Methods§

Implementations on Foreign Types§

Source§

impl<T> IntoRequest for Request<T>
where T: Body + Any, T::Data: Into<Vec<u8>>, T::Error: Into<Box<dyn Error + Send + Sync + 'static>>,

Implementors§