Struct borked::BaseBork[][src]

pub struct BaseBork {
    pub name: String,
    pub cause: Option<Box<dyn BorkChain>>,
}
Expand description

Basic bork implemntation. Used by borked! macro, But could also be useful for use as a basic error type. (or as a templeate for implementing custom Bork errors.

Fields

name: Stringcause: Option<Box<dyn BorkChain>>

Trait Implementations

This should return a new instantation of the type implementing it.

This should return a new instantation of the type implementing it, and the string passed in as msg should in some way be returned by the name function in BorkChain. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Used to store Bork within the Bork referenced by self. The stored Error is considered to be the cause of the referenced Error. The stored error can then be retrieved with the cause() fn. Read more

Get the name of the Error. This will be used to print the error.

Return a new Instantiation. Return type is an option, so None can be returned if it is otherwise inconvienient to implement this. The other traits BorkWithMsg and/or BorkNoMsg can be implemented instead for a method that is not Optional. Read more

Get the cause of the error. This is set either at Instantiation of the Error, or through the chain fn. Read more

Used for downcasting Borks to their underlying type.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.