[−][src]Trait core_error::Error
Error
is a trait representing the basic expectations for error values,
i.e., values of type E
in Result<T, E>
. Errors must describe
themselves through the Display
and Debug
traits, and may provide
cause chain information:
The source
method is generally used when errors cross "abstraction
boundaries". If one module must report an error that is caused by an error
from a lower-level module, it can allow access to that error via the
source
method. This makes it possible for the high-level module to
provide its own errors while also revealing some of the implementation for
debugging via source
chains.
Provided methods
Loading content...Methods
impl dyn Error + 'static
[src]
pub fn is<T: Error + Any>(&self) -> bool
[src]
Returns true
if the boxed type is the same as T
pub fn downcast_ref<T: Error + Any>(&self) -> Option<&T>
[src]
Returns some reference to the boxed value if it is of type T
, or
None
if it isn't.
pub fn downcast_mut<T: Error + Any>(&mut self) -> Option<&mut T>
[src]
Returns some mutable reference to the boxed value if it is of type T
,
or None
if it isn't.
impl dyn Error + Send + 'static
[src]
pub fn is<T: Error + Any>(&self) -> bool
[src]
Returns true
if the boxed type is the same as T
pub fn downcast_ref<T: Error + Any>(&self) -> Option<&T>
[src]
Returns some reference to the boxed value if it is of type T
, or
None
if it isn't.
pub fn downcast_mut<T: Error + Any>(&mut self) -> Option<&mut T>
[src]
Returns some mutable reference to the boxed value if it is of type T
,
or None
if it isn't.
impl dyn Error + Send + Sync + 'static
[src]
pub fn is<T: Error + Any>(&self) -> bool
[src]
Returns true
if the boxed type is the same as T
pub fn downcast_ref<T: Error + Any>(&self) -> Option<&T>
[src]
Returns some reference to the boxed value if it is of type T
, or
None
if it isn't.
pub fn downcast_mut<T: Error + Any>(&mut self) -> Option<&mut T>
[src]
Returns some mutable reference to the boxed value if it is of type T
,
or None
if it isn't.