pub struct ListError(pub ListErrorKind, _);Expand description
The Error type.
This tuple struct is made of two elements:
- an
ErrorKindwhich is used to determine the type of the error. - An internal
State, not meant for direct use outside oferror_chaininternals, containing:- a backtrace, generated when the error is created.
- an error chain, used for the implementation of
Error::cause().
Tuple Fields§
§0: ListErrorKindThe kind of the error.
Implementations§
Source§impl ListError
impl ListError
Sourcepub fn from_kind(kind: ListErrorKind) -> ListError
pub fn from_kind(kind: ListErrorKind) -> ListError
Constructs an error from a kind, and generates a backtrace.
Sourcepub fn with_chain<E, K>(error: E, kind: K) -> ListError
pub fn with_chain<E, K>(error: E, kind: K) -> ListError
Constructs a chained error from another error and a kind, and generates a backtrace.
Sourcepub fn with_boxed_chain<K>(error: Box<dyn Error + Send>, kind: K) -> ListErrorwhere
K: Into<ListErrorKind>,
pub fn with_boxed_chain<K>(error: Box<dyn Error + Send>, kind: K) -> ListErrorwhere
K: Into<ListErrorKind>,
Construct a chained error from another boxed error and a kind, and generates a backtrace
Sourcepub fn kind(&self) -> &ListErrorKind
pub fn kind(&self) -> &ListErrorKind
Returns the kind of the error.
Methods from Deref<Target = ListErrorKind>§
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
A string describing the error kind.
Trait Implementations§
Source§impl ChainedError for ListError
impl ChainedError for ListError
Source§type ErrorKind = ListErrorKind
type ErrorKind = ListErrorKind
Associated kind type.
Source§fn from_kind(kind: Self::ErrorKind) -> Self
fn from_kind(kind: Self::ErrorKind) -> Self
Constructs an error from a kind, and generates a backtrace.
Source§fn with_chain<E, K>(error: E, kind: K) -> Self
fn with_chain<E, K>(error: E, kind: K) -> Self
Constructs a chained error from another error and a kind, and generates a backtrace.
Source§fn display_chain<'a>(&'a self) -> DisplayChain<'a, Self>
fn display_chain<'a>(&'a self) -> DisplayChain<'a, Self>
Returns an object which implements
Display for printing the full
context of this error. Read moreSource§impl Error for ListError
impl Error for ListError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl From<ListError> for ListErrorKind
impl From<ListError> for ListErrorKind
Source§impl From<ListErrorKind> for ListError
impl From<ListErrorKind> for ListError
Source§fn from(e: ListErrorKind) -> Self
fn from(e: ListErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ListError
impl !RefUnwindSafe for ListError
impl Send for ListError
impl !Sync for ListError
impl Unpin for ListError
impl !UnwindSafe for ListError
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