Trait WithSource

Source
pub trait WithSource {
    // Required method
    fn with_source<E: Source>(self, source: E) -> Self;
}
Expand description

Trait for adding a source to an error type.

Required Methods§

Source

fn with_source<E: Source>(self, source: E) -> Self

Adds a source to the error.

§Arguments
  • source - The source error to add.
§Returns

The error with the added source.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> WithSource for Error<T>

Source§

fn with_source<E: Source>(self, source: E) -> Self

Implementors§