[−][src]Struct pl_lens::ComposedLens
Composes two Lens
es.
In pseudocode:
compose(Lens<A, B>, Lens<B, C>) -> Lens<A, C>
Trait Implementations
impl<LHS, RHS> Lens for ComposedLens<LHS, RHS> where
LHS: RefLens,
LHS::Target: 'static,
RHS: Lens<Source = LHS::Target>,
[src]
LHS: RefLens,
LHS::Target: 'static,
RHS: Lens<Source = LHS::Target>,
type Source = LHS::Source
The lens source type, i.e., the object containing the field.
type Target = RHS::Target
The lens target type, i.e., the field to be accessed or modified.
fn path(&self) -> LensPath
[src]
fn mutate<'a>(&self, source: &'a mut LHS::Source, target: RHS::Target)
[src]
fn set(&self, source: Self::Source, target: Self::Target) -> Self::Source
[src]
impl<LHS, RHS> RefLens for ComposedLens<LHS, RHS> where
LHS: RefLens,
LHS::Target: 'static,
RHS: RefLens<Source = LHS::Target>,
[src]
LHS: RefLens,
LHS::Target: 'static,
RHS: RefLens<Source = LHS::Target>,
fn get_ref<'a>(&self, source: &'a LHS::Source) -> &'a RHS::Target
[src]
fn get_mut_ref<'a>(&self, source: &'a mut LHS::Source) -> &'a mut RHS::Target
[src]
fn mutate_with_fn<'a>(
&self,
source: &'a mut Self::Source,
f: &dyn Fn(&Self::Target) -> Self::Target
)
[src]
&self,
source: &'a mut Self::Source,
f: &dyn Fn(&Self::Target) -> Self::Target
)
fn modify(
&self,
source: Self::Source,
f: &dyn Fn(&Self::Target) -> Self::Target
) -> Self::Source
[src]
&self,
source: Self::Source,
f: &dyn Fn(&Self::Target) -> Self::Target
) -> Self::Source
impl<LHS, RHS> ValueLens for ComposedLens<LHS, RHS> where
LHS: RefLens,
LHS::Target: 'static,
RHS: ValueLens<Source = LHS::Target>,
[src]
LHS: RefLens,
LHS::Target: 'static,
RHS: ValueLens<Source = LHS::Target>,
Auto Trait Implementations
impl<LHS, RHS> RefUnwindSafe for ComposedLens<LHS, RHS> where
LHS: RefUnwindSafe,
RHS: RefUnwindSafe,
LHS: RefUnwindSafe,
RHS: RefUnwindSafe,
impl<LHS, RHS> Send for ComposedLens<LHS, RHS> where
LHS: Send,
RHS: Send,
LHS: Send,
RHS: Send,
impl<LHS, RHS> Sync for ComposedLens<LHS, RHS> where
LHS: Sync,
RHS: Sync,
LHS: Sync,
RHS: Sync,
impl<LHS, RHS> Unpin for ComposedLens<LHS, RHS> where
LHS: Unpin,
RHS: Unpin,
LHS: Unpin,
RHS: Unpin,
impl<LHS, RHS> UnwindSafe for ComposedLens<LHS, RHS> where
LHS: UnwindSafe,
RHS: UnwindSafe,
LHS: UnwindSafe,
RHS: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,