pub trait IntoResponse {
// Required method
fn into_response(self) -> Result<Response, ErrorCode>;
}Expand description
A trait for any type that can be converted into a wasip3::http::types::Response.
This trait provides a unified interface for adapting user-defined response
types into the lower-level wasip3::http::types::Response format used by
the WASI HTTP subsystem.
Implementing IntoResponse enables ergonomic conversion from domain-level
response types or builders into standardized WASI HTTP responses.
§See also
FromResponse: The inverse conversion trait.
Required Methods§
Sourcefn into_response(self) -> Result<Response, ErrorCode>
fn into_response(self) -> Result<Response, ErrorCode>
Converts self into a wasip3::http::types::Response.