Struct trackable::error::Failure
[−]
[src]
pub struct Failure(_);
TrackableError
type specialized for Failed
.
Methods
impl Failure
[src]
fn from_error<E>(error: E) -> Self where
E: Into<BoxError>,
[src]
E: Into<BoxError>,
Makes a new Failure
instance which was caused by the error
.
Methods from Deref<Target = TrackableError<Failed>>
fn kind(&self) -> &K
[src]
Returns the kind of this error.
fn concrete_cause<T>(&self) -> Option<&T> where
T: Error + 'static,
[src]
T: Error + 'static,
Tries to return the cause of this error as a value of T
type.
If neither this error has a cause nor it is an T
value,
this method will return None
.
Trait Implementations
impl Debug for Failure
[src]
impl Clone for Failure
[src]
fn clone(&self) -> Failure
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Deref for Failure
[src]
type Target = TrackableError<Failed>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl Display for Failure
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Error for Failure
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
[src]
The lower-level cause of this error, if any. Read more
impl Trackable for Failure
[src]
type Event = Event
Event type which a history of an instance of this type can have.
fn assign_tracking_number(&mut self)
[src]
Assigns a randomly generated tracking number to this instance. Read more
fn tracking_number(&self) -> Option<TrackingNumber>
[src]
Returns the tracking number of this instance if it has been assigned.
fn enable_tracking(self) -> Self where
Self: Sized,
[src]
Self: Sized,
Enables tracking of this instance.
fn disable_tracking(self) -> Self where
Self: Sized,
[src]
Self: Sized,
Disables tracking of this intance.
fn history(&self) -> Option<&History<Self::Event>>
[src]
Returns the reference of the tracking history of this instance.
fn history_mut(&mut self) -> Option<&mut History<Self::Event>>
[src]
Returns the mutable reference of the tracking history of this instance.
fn track<F>(&mut self, f: F) where
F: FnOnce() -> Self::Event,
[src]
F: FnOnce() -> Self::Event,
Add an event into the tail of the history of this instance. Read more
fn in_tracking(&self) -> bool
[src]
Returns true
if tracking of this instance is enabled, otherwise false
.
impl From<TrackableError<Failed>> for Failure
[src]
fn from(f: TrackableError<Failed>) -> Self
[src]
Performs the conversion.