pub unsafe trait AsContext: AsRef<Context<Self::Target>> {
    type Target: Sync;
}
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.

Required Associated Types§

Implementors§

source§

impl<T> AsContext for Context<T>where T: Sync,

§

type Target = T