Trait ContextWrapperExt

Source
pub trait ContextWrapperExt<C: Send + Sync>
where Self: Sized,
{ // Required method fn with_context(self, context: C) -> ContextWrapper<Self, C>; }
Expand description

Trait to extend an API to make it easy to bind it to a context.

Required Methods§

Source

fn with_context(self, context: C) -> ContextWrapper<Self, C>

Binds this API to a context.

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.

Implementors§

Source§

impl<T: Api<C> + Send + Sync, C: Clone + Send + Sync> ContextWrapperExt<C> for T