pub struct Status { /* private fields */ }
Implementations§
source§impl Status
impl Status
pub fn new(code: Code, message: String) -> Self
pub fn with_message(self, message: String) -> Self
pub fn from_std_erro<T: Error>(err: T) -> Self
pub fn from_error(err: Box<dyn Error + Send + Sync>) -> Self
pub fn code(&self) -> Code
pub fn to_http(&self) -> Response<BoxBody>
pub fn to_hyper_body(&self) -> Response<Body>
Trait Implementations§
source§impl Error for Status
impl Error for Status
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()