pub struct RpressError {
pub status: StatusCode,
pub message: String,
}Expand description
Default error type for Rpress handlers, carrying an HTTP status and message.
Fields§
§status: StatusCode§message: StringTrait Implementations§
Source§impl Debug for RpressError
impl Debug for RpressError
Source§impl Display for RpressError
impl Display for RpressError
Source§impl Error for RpressError
impl Error for RpressError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Source§impl From<Error> for RpressError
impl From<Error> for RpressError
Source§impl RpressErrorExt for RpressError
impl RpressErrorExt for RpressError
Source§fn into_rpress_error(self) -> (StatusCode, String)
fn into_rpress_error(self) -> (StatusCode, String)
Converts this error into a status code and message pair.
Auto Trait Implementations§
impl Freeze for RpressError
impl RefUnwindSafe for RpressError
impl Send for RpressError
impl Sync for RpressError
impl Unpin for RpressError
impl UnsafeUnpin for RpressError
impl UnwindSafe for RpressError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<E> IntoRpressResult for Ewhere
E: RpressErrorExt,
impl<E> IntoRpressResult for Ewhere
E: RpressErrorExt,
Source§fn into_result(self) -> Result<ResponsePayload, RpressError>
fn into_result(self) -> Result<ResponsePayload, RpressError>
Converts this value into a
Result<ResponsePayload, RpressError>.