Struct im::lens::Compose
[−]
[src]
pub struct Compose<A, B, C, L, R> where
L: PartialLens<From = A, To = B>,
R: PartialLens<From = B, To = C>, { /* fields omitted */ }Trait Implementations
impl<A, B, C, L, R> Clone for Compose<A, B, C, L, R> where
L: PartialLens<From = A, To = B>,
R: PartialLens<From = B, To = C>, [src]
L: PartialLens<From = A, To = B>,
R: PartialLens<From = B, To = C>,
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl<A, B, C, L, R> PartialLens for Compose<A, B, C, L, R> where
L: PartialLens<From = A, To = B>,
R: PartialLens<From = B, To = C>, [src]
L: PartialLens<From = A, To = B>,
R: PartialLens<From = B, To = C>,
type From = A
type To = C
fn try_get(&self, s: &A) -> Option<Arc<C>>
Get the focus of the lens, if available.
fn try_put<FromC>(&self, v: Option<FromC>, s: &A) -> Option<A> where
Arc<C>: From<FromC>,
Arc<C>: From<FromC>,
Put a value into the lens, returning the updated From value if the operation succeeded. Read more
fn try_chain<L, Next>(
&self,
next: &L
) -> Compose<Self::From, Self::To, Next, Self, L> where
L: PartialLens<From = Self::To, To = Next>,
&self,
next: &L
) -> Compose<Self::From, Self::To, Next, Self, L> where
L: PartialLens<From = Self::To, To = Next>,
Compose this lens with a lens from To to a new type Next, yielding a lens from From to Next. Read more
impl<A, B, C, L, R> Lens for Compose<A, B, C, L, R> where
L: Lens<From = A, To = B>,
R: Lens<From = B, To = C>, [src]
L: Lens<From = A, To = B>,
R: Lens<From = B, To = C>,
fn get(&self, s: &Self::From) -> Arc<Self::To>
Get the focus of the lens.
fn put<Convert>(&self, v: Convert, s: &Self::From) -> Self::From where
Arc<Self::To>: From<Convert>,
Arc<Self::To>: From<Convert>,
Put a value into the lens, returning the updated From value.
fn chain<L, Next>(
&self,
next: &L
) -> Compose<Self::From, Self::To, Next, Self, L> where
L: Lens<From = Self::To, To = Next>,
&self,
next: &L
) -> Compose<Self::From, Self::To, Next, Self, L> where
L: Lens<From = Self::To, To = Next>,
Compose this lens with a lens from To to a new type Next, yielding a lens from From to Next. Read more