pub trait GenerateImplicitData {
// Required method
fn generate() -> Self;
// Provided method
fn generate_with_source(source: &dyn Error) -> Self
where Self: Sized { ... }
}Expand description
Construct data to be included as part of an error. The data must require no arguments to be created.
Required Methods§
Provided Methods§
Sourcefn generate_with_source(source: &dyn Error) -> Selfwhere
Self: Sized,
fn generate_with_source(source: &dyn Error) -> Selfwhere
Self: Sized,
Build the data using the given 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 GenerateImplicitData for Option<Backtrace>
Available on crate feature std only.Only create a backtrace when an environment variable is set.
impl GenerateImplicitData for Option<Backtrace>
std only.Only create a backtrace when an environment variable is set.
This looks first for the value of RUST_LIB_BACKTRACE then
RUST_BACKTRACE. If the value is set to 1, backtraces will be
enabled.
This value will be tested only once per program execution; changing the environment variable after it has been checked will have no effect.
§Interaction with the Provider API
If you enable the unstable-provider-api feature
flag, a backtrace will not be captured if the
original error is able to provide a Backtrace, even if the
appropriate environment variables are set. This prevents capturing
a redundant backtrace.
Source§impl<T> GenerateImplicitData for Box<T>where
T: GenerateImplicitData,
Available on crate feature alloc only.
impl<T> GenerateImplicitData for Box<T>where
T: GenerateImplicitData,
alloc only.Source§impl<T> GenerateImplicitData for Rc<T>where
T: GenerateImplicitData,
Available on crate feature alloc only.
impl<T> GenerateImplicitData for Rc<T>where
T: GenerateImplicitData,
alloc only.Source§impl<T> GenerateImplicitData for Arc<T>where
T: GenerateImplicitData,
Available on crate feature alloc and (crate feature std, or crate feature rust_1_61 and target_has_atomic="ptr") only.
impl<T> GenerateImplicitData for Arc<T>where
T: GenerateImplicitData,
alloc and (crate feature std, or crate feature rust_1_61 and target_has_atomic="ptr") only.Implementors§
impl GenerateImplicitData for Backtrace
std and crate feature rust_1_65 and non-crate feature backtraces-impl-backtrace-crate only.