[][src]Struct myopic::lens::lens_fn::Lens

pub struct Lens<D, A> {
    pub getter: fn(_: &D) -> A,
    pub setter: fn(_: &mut D, _: A),
}

Fields

getter: fn(_: &D) -> Asetter: fn(_: &mut D, _: A)

Methods

impl<D, A> Lens<D, A>[src]

pub fn new(getter: fn(_: &D) -> A, setter: fn(_: &mut D, _: A)) -> Self[src]

Trait Implementations

impl<D, A> Lensable for Lens<D, A>[src]

type Input = D

type Output = A

impl<D, A> Getter for Lens<D, A>[src]

impl<D, A> Optical for Lens<D, A>[src]

impl<D, A> Setter for Lens<D, A>[src]

Auto Trait Implementations

impl<D, A> Send for Lens<D, A>

impl<D, A> Unpin for Lens<D, A>

impl<D, A> Sync for Lens<D, A>

impl<D, A> UnwindSafe for Lens<D, A>

impl<D, A> RefUnwindSafe for Lens<D, A>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]