Struct scsys_core::errors::Error
source · pub struct Error { /* private fields */ }
Implementations§
source§impl Error
impl Error
pub fn new(kind: impl Into<ErrorKind>, message: impl ToString) -> Self
pub fn unknown(message: impl ToString) -> Self
pub fn id(&self) -> usize
pub fn kind(&self) -> &ErrorKind
pub fn message(&self) -> &str
pub fn timestamp(&self) -> u128
pub fn set_kind(&mut self, kind: ErrorKind)
pub fn set_message(&mut self, message: String)
pub fn with_kind(self, kind: ErrorKind) -> Self
pub fn with_message(self, message: String) -> Self
Trait Implementations§
source§impl Error for Error
impl Error for Error
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()
source§impl From<FromUtf16Error> for Error
impl From<FromUtf16Error> for Error
source§fn from(err: FromUtf16Error) -> Self
fn from(err: FromUtf16Error) -> Self
Converts to this type from the input type.
source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
source§impl From<ParseFloatError> for Error
impl From<ParseFloatError> for Error
source§fn from(err: ParseFloatError) -> Self
fn from(err: ParseFloatError) -> Self
Converts to this type from the input type.
source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
source§fn from(err: ParseIntError) -> Self
fn from(err: ParseIntError) -> Self
Converts to this type from the input type.
source§impl Ord for Error
impl Ord for Error
source§impl PartialEq for Error
impl PartialEq for Error
source§impl PartialOrd for Error
impl PartialOrd for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Error
impl Send for Error
impl StructuralPartialEq for Error
impl Sync for Error
Auto Trait Implementations§
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