pub trait FromContextOnce<C, M = Once>: Sized {
type Error: Into<BoxError>;
type Future<'c>: Future<Output = Result<Self, Self::Error>> + 'c
where C: 'c;
// Required method
fn from_context_once(context: Exclusive<'_, C>) -> Self::Future<'_>;
}Expand description
Extract data from the given context. The extraction will only be possible once.
Required Associated Types§
type Error: Into<BoxError>
type Future<'c>: Future<Output = Result<Self, Self::Error>> + 'c where C: 'c
Required Methods§
fn from_context_once(context: Exclusive<'_, C>) -> Self::Future<'_>
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.