Struct micro_errors::ErrorChain

source ยท
pub struct ErrorChain<T: Display>(pub T, pub ErrorLink);
๐Ÿ‘ŽDeprecated since 0.3.0: use ErrorLink_ instead

Tuple Fieldsยง

ยง0: T
๐Ÿ‘ŽDeprecated since 0.3.0: use ErrorLink_ instead
ยง1: ErrorLink
๐Ÿ‘ŽDeprecated since 0.3.0: use ErrorLink_ instead

Implementationsยง

sourceยง

impl ErrorChain<String>

source

pub fn start(error_message: impl Into<String>) -> Self

source

pub fn add<T: Display>( error_message: impl Into<String>, current_chain: ErrorChain<T>, ) -> Self

source

pub fn add_fn<T: Display>( error_message: impl Into<String>, ) -> impl FnOnce(ErrorChain<T>) -> Self

source

pub fn onboard<T: Display>( error_message: impl Into<String>, underlying_error: T, ) -> Self

source

pub fn onboard_fn<T: Display>( error_message: impl Into<String>, ) -> impl FnOnce(T) -> Self

Trait Implementationsยง

sourceยง

impl<T: Debug + Display> Debug for ErrorChain<T>

sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
sourceยง

impl<T: Display> Display for ErrorChain<T>

sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
sourceยง

impl<T: Error> From<T> for ErrorChain<String>

sourceยง

fn from(value: T) -> Self

Converts to this type from the input type.

Auto Trait Implementationsยง

ยง

impl<T> !Freeze for ErrorChain<T>

ยง

impl<T> RefUnwindSafe for ErrorChain<T>
where T: RefUnwindSafe,

ยง

impl<T> Send for ErrorChain<T>
where T: Send,

ยง

impl<T> Sync for ErrorChain<T>
where T: Sync,

ยง

impl<T> Unpin for ErrorChain<T>
where T: Unpin,

ยง

impl<T> UnwindSafe for ErrorChain<T>
where T: UnwindSafe,

Blanket Implementationsยง

sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
sourceยง

impl<T> ErrorLinkable<T, String> for T
where T: Any + Display,

sourceยง

impl<T> From<!> for T

sourceยง

fn from(t: !) -> T

Converts to this type from the input type.
sourceยง

impl<T> From<T> for T

sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

sourceยง

impl<T> ToString for T
where T: Display + ?Sized,

sourceยง

default fn to_string(&self) -> String

Converts the given value to a String. Read more
sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

ยง

type Error = Infallible

The type returned in the event of a conversion error.
sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

ยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.