Enum vit_servicing_station_lib::v0::errors::HandleError
source · pub enum HandleError {
NotFound(String),
DatabaseError(PoolError),
UnauthorizedToken,
InternalError(String),
InvalidHeader(&'static str, &'static str),
BadRequest(String),
}
Variants§
NotFound(String)
DatabaseError(PoolError)
InternalError(String)
InvalidHeader(&'static str, &'static str)
BadRequest(String)
Implementations§
source§impl HandleError
impl HandleError
fn to_status_code(&self) -> StatusCode
fn to_message(&self) -> String
fn to_response(&self) -> Response
fn to_json(&self) -> Value
Trait Implementations§
source§impl Debug for HandleError
impl Debug for HandleError
source§impl Display for HandleError
impl Display for HandleError
source§impl Error for HandleError
impl Error for HandleError
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()
source§impl From<Error> for HandleError
impl From<Error> for HandleError
source§impl Reply for HandleError
impl Reply for HandleError
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Converts the given value into a
Response
.impl Reject for HandleError
Auto Trait Implementations§
impl RefUnwindSafe for HandleError
impl Send for HandleError
impl Sync for HandleError
impl Unpin for HandleError
impl UnwindSafe for HandleError
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