Trait IntoResponse

Source
pub trait IntoResponse {
    // Required method
    fn into_raw(self) -> Result<Response, impl Into<Box<dyn Error>>>;
}
Expand description

A trait used to represent any viable Response type that can be used in the Worker. The only requirement is that it be convertible to a web_sys::Response.

Required Methods§

Source

fn into_raw(self) -> Result<Response, impl Into<Box<dyn Error>>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IntoResponse for Response

Source§

fn into_raw(self) -> Result<Response, impl Into<Box<dyn Error>>>

Source§

impl<B> IntoResponse for Response<B>
where B: Body<Data = Bytes> + 'static,

Source§

fn into_raw(self) -> Result<Response, impl Into<Box<dyn Error>>>

Implementors§