Trait Res
pub trait Res {
// Required methods
fn error_response(path: &str, err: Bytes) -> Self;
fn redirect(&mut self, path: &str);
}
Expand description
Represents the response as created by the server;
Required Methods§
fn error_response(path: &str, err: Bytes) -> Self
fn error_response(path: &str, err: Bytes) -> Self
Converts an error into a response, with a 500
status code and the error text as its body.
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.