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<Re>(&self, s: Re) -> Option<Arc<C>> where
Re: AsRef<A>,
Re: AsRef<A>,
Get the focus of the lens, if available.
fn try_put<FromC, Re>(&self, v: Option<FromC>, s: Re) -> Option<A> where
Re: AsRef<A>,
Arc<C>: From<FromC>,
Re: AsRef<A>,
Arc<C>: From<FromC>,
Put a value into the lens, returning the updated From
value is 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<R>(&self, s: R) -> Arc<Self::To> where
R: AsRef<Self::From>,
R: AsRef<Self::From>,
Get the focus of the lens.
fn put<Convert, R>(&self, v: Convert, s: R) -> Self::From where
R: AsRef<Self::From>,
Arc<Self::To>: From<Convert>,
R: AsRef<Self::From>,
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