pub enum CoolError {
BadRequest(String),
NotAcceptable(String),
Unauthorized(String),
UnsupportedMediaType(String),
Forbidden(String),
NotFound(String),
Conflict(String),
Validation(String),
Codec(String),
Database(String),
Internal(String),
}Variants§
BadRequest(String)
NotAcceptable(String)
UnsupportedMediaType(String)
Forbidden(String)
NotFound(String)
Conflict(String)
Validation(String)
Codec(String)
Database(String)
Internal(String)
Implementations§
Source§impl CoolError
impl CoolError
pub fn code(&self) -> &'static str
pub fn status_code(&self) -> StatusCode
pub fn into_response(self) -> CoolErrorResponse
Trait Implementations§
Source§impl Error for CoolError
impl Error for CoolError
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()
Auto Trait Implementations§
impl Freeze for CoolError
impl RefUnwindSafe for CoolError
impl Send for CoolError
impl Sync for CoolError
impl Unpin for CoolError
impl UnsafeUnpin for CoolError
impl UnwindSafe for CoolError
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