Skip to main content

ContextLens

Trait ContextLens 

Source
pub trait ContextLens<C, A1, A2>: Send + 'static
where C: Context, A1: Slot, A2: Slot,
{ type Deleted: Context; type Target: Context; // Required methods fn extract_source( channels: C::Endpoints, ) -> (A1::Endpoint, <Self::Deleted as Context>::Endpoints); fn insert_target( receiver: A2::Endpoint, channels: <Self::Deleted as Context>::Endpoints, ) -> <Self::Target as Context>::Endpoints; }

Required Associated Types§

Required Methods§

Source

fn extract_source( channels: C::Endpoints, ) -> (A1::Endpoint, <Self::Deleted as Context>::Endpoints)

Source

fn insert_target( receiver: A2::Endpoint, channels: <Self::Deleted as Context>::Endpoints, ) -> <Self::Target as Context>::Endpoints

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B, A1, A2, C, N> ContextLens<(B, C), A1, A2> for S<N>
where B: Slot, A1: Slot, A2: Slot, C: Context, N: ContextLens<C, A1, A2>,

Source§

type Deleted = (B, <N as ContextLens<C, A1, A2>>::Deleted)

Source§

type Target = (B, <N as ContextLens<C, A1, A2>>::Target)

Source§

impl<C, A1, A2> ContextLens<(A1, C), A1, A2> for Z
where A1: Slot, A2: Slot, C: Context,