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.

Required Associated Types§

source

type Target: Sync + 'static

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Target = T