pub trait Context<T, Source, Middle, Target, C>: Sized{
// Required methods
fn context_and_location(
self,
context: C,
location: Location,
) -> Result<T, Target>;
fn with_context_and_location<F>(
self,
f: F,
location: Location,
) -> Result<T, Target>
where F: FnOnce() -> C;
// Provided methods
fn context(self, context: C) -> Result<T, Target> { ... }
fn with_context<F>(self, f: F) -> Result<T, Target>
where F: FnOnce() -> C { ... }
}Required Methods§
fn context_and_location( self, context: C, location: Location, ) -> Result<T, Target>
fn with_context_and_location<F>(
self,
f: F,
location: Location,
) -> Result<T, Target>where
F: FnOnce() -> C,
Provided Methods§
fn context(self, context: C) -> Result<T, Target>
fn with_context<F>(self, f: F) -> Result<T, Target>where
F: FnOnce() -> C,
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.