Trait async_local::AsContext
source · pub unsafe trait AsContext: AsRef<Context<Self::Target>> {
type Target: Sync + 'static;
}
Expand description
A marker trait promising that AsRef<Context<T>
> is implemented in a way that can’t be invalidated
Safety
Context must not be a type that can be invalidated as references may exist for the lifetime of the runtime.