pub struct Lens<PO: Strong<S, T>, PI: Strong<A, B>, S, T, A, B>(pub Optic<PO, PI, S, T, A, B>);Expand description
A Lens is a type of Optic that focuses on a part A of a whole S,
allowing both getting the part and setting it (which might change S to T
and A to B).
Lenses are typically built from Strong profunctors.
This Lens struct wraps an Optic.
Tuple Fields§
§0: Optic<PO, PI, S, T, A, B>The underlying Optic representation of the lens.
Trait Implementations§
Auto Trait Implementations§
impl<PO, PI, S, T, A, B> !RefUnwindSafe for Lens<PO, PI, S, T, A, B>
impl<PO, PI, S, T, A, B> !Send for Lens<PO, PI, S, T, A, B>
impl<PO, PI, S, T, A, B> !Sync for Lens<PO, PI, S, T, A, B>
impl<PO, PI, S, T, A, B> !UnwindSafe for Lens<PO, PI, S, T, A, B>
impl<PO, PI, S, T, A, B> Freeze for Lens<PO, PI, S, T, A, B>
impl<PO, PI, S, T, A, B> Unpin for Lens<PO, PI, S, T, A, B>
impl<PO, PI, S, T, A, B> UnsafeUnpin for Lens<PO, PI, S, T, A, B>where
Optic<PO, PI, S, T, A, B>: UnsafeUnpin,
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