Struct scutiger_core::errors::Error
source · [−]pub struct Error { /* private fields */ }
Implementations
sourceimpl Error
impl Error
sourcepub fn new<E: Into<Box<dyn Error + Send + Sync>>>(
kind: ErrorKind,
error: Option<E>
) -> Self
pub fn new<E: Into<Box<dyn Error + Send + Sync>>>(
kind: ErrorKind,
error: Option<E>
) -> Self
Create a new error.
If this error was caused by another error, specify it as Some(error)
.
sourcepub fn new_simple(kind: ErrorKind) -> Self
pub fn new_simple(kind: ErrorKind) -> Self
Create a new error without wrapping any other error.
sourcepub fn from_message<M: Into<String>>(kind: ErrorKind, msg: M) -> Self
pub fn from_message<M: Into<String>>(kind: ErrorKind, msg: M) -> Self
Create a new error without wrapping any other error.
sourcepub fn io_kind(&self) -> ErrorKind
pub fn io_kind(&self) -> ErrorKind
Return the kind of this error when converted into an io::Error
.
If the internal error is an io::Error
, returns its kind; otherwise, returns the kind it
would have if it were converted into an io::Error
.
sourcepub fn fatal(&self) -> bool
pub fn fatal(&self) -> bool
Indicate whether this error is considered fatal.
An error is fatal if it results in an exit of 2 or higher. A missing revision is not considered fatal, but other errors are.
sourcepub fn exit_status(&self) -> ExitStatus
pub fn exit_status(&self) -> ExitStatus
Return the exit status for this error.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more