pub struct ComposedLens<LHS, RHS> { /* private fields */ }Expand description
Composes two Lenses.
In pseudocode:
compose(Lens<A, B>, Lens<B, C>) -> Lens<A, C>Trait Implementations§
Source§impl<LHS, RHS> Lens for ComposedLens<LHS, RHS>
impl<LHS, RHS> Lens for ComposedLens<LHS, RHS>
Source§type Source = <LHS as Lens>::Source
type Source = <LHS as Lens>::Source
The lens source type, i.e., the object containing the field.
Source§type Target = <RHS as Lens>::Target
type Target = <RHS as Lens>::Target
The lens target type, i.e., the field to be accessed or modified.
Source§impl<LHS, RHS> RefLens for ComposedLens<LHS, RHS>
impl<LHS, RHS> RefLens for ComposedLens<LHS, RHS>
Source§fn get_ref<'a>(&self, source: &'a LHS::Source) -> &'a RHS::Target
fn get_ref<'a>(&self, source: &'a LHS::Source) -> &'a RHS::Target
Gets a reference to the target of the lens. (This does not consume the source.)
Auto Trait Implementations§
impl<LHS, RHS> Freeze for ComposedLens<LHS, RHS>
impl<LHS, RHS> RefUnwindSafe for ComposedLens<LHS, RHS>where
LHS: RefUnwindSafe,
RHS: RefUnwindSafe,
impl<LHS, RHS> Send for ComposedLens<LHS, RHS>
impl<LHS, RHS> Sync for ComposedLens<LHS, RHS>
impl<LHS, RHS> Unpin for ComposedLens<LHS, RHS>
impl<LHS, RHS> UnsafeUnpin for ComposedLens<LHS, RHS>where
LHS: UnsafeUnpin,
RHS: UnsafeUnpin,
impl<LHS, RHS> UnwindSafe for ComposedLens<LHS, RHS>where
LHS: UnwindSafe,
RHS: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more