pub trait IntoResponse: Sized {
    // Required method
    fn to_response(self) -> Result<Response, CatBridgeError>;
}Available on crate features 
clients or servers only.Expand description
A blanket trait to implement into a full response.
This was mainly implemented so functions that return things like
Bytes, can naturally get wrapped into a result without needing
to return a result themselves.
Required Methods§
Sourcefn to_response(self) -> Result<Response, CatBridgeError>
 
fn to_response(self) -> Result<Response, CatBridgeError>
Convert an arbitrary type to a Response.
§Errors
If for whatever reason the type can’t be turned into a response.
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.