Type Alias smart_config::ErrorWithOrigin

source ·
pub type ErrorWithOrigin = WithOrigin<LowLevelError>;
Expand description

Error together with its origin.

Aliased Type§

struct ErrorWithOrigin {
    pub inner: LowLevelError,
    pub origin: Arc<ValueOrigin>,
}

Fields§

§inner: LowLevelError

Inner value.

§origin: Arc<ValueOrigin>

Origin of the value.

Implementations§

source§

impl ErrorWithOrigin

source

pub fn custom(message: impl Display) -> Self

Creates a custom error.

Trait Implementations§

source§

impl Display for ErrorWithOrigin

source§

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

Formats the value using the given formatter. Read more
source§

impl Error for ErrorWithOrigin

source§

fn custom<T: Display>(msg: T) -> Self

Raised when there is general error when deserializing a type. Read more
source§

fn missing_field(field: &'static str) -> Self

Raised when a Deserialize struct type expected to receive a required field with a particular name but that field was not present in the input.
source§

fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a type different from what it was expecting. Read more
source§

fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a value of the right type but that is wrong for some other reason. Read more
source§

fn invalid_length(len: usize, exp: &dyn Expected) -> Self

Raised when deserializing a sequence or map and the input data contains too many or too few elements. Read more
source§

fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize enum type received a variant with an unrecognized name.
source§

fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize struct type received a field with an unrecognized name.
source§

fn duplicate_field(field: &'static str) -> Self

Raised when a Deserialize struct type received more than one of the same field.
source§

impl Error for ErrorWithOrigin

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more