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

pub struct Lens<G, S, D, A> {
    pub getter: G,
    pub setter: S,
    // some fields omitted
}

Fields

getter: Gsetter: S

Methods

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

pub fn new(g: G, s: S) -> Self[src]

Trait Implementations

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

type Input = D

type Output = A

impl<G, S, D, A> Getter for Lens<G, S, D, A> where
    G: Fn(&D) -> A, 
[src]

impl<G, S, D, A> Optical for Lens<G, S, D, A> where
    S: Fn(&mut D, A),
    G: Fn(&D) -> A, 
[src]

impl<G, S, D, A> Setter for Lens<G, S, D, A> where
    S: Fn(&mut D, A), 
[src]

Auto Trait Implementations

impl<G, S, D, A> Send for Lens<G, S, D, A> where
    A: Send,
    D: Send,
    G: Send,
    S: Send

impl<G, S, D, A> Unpin for Lens<G, S, D, A> where
    A: Unpin,
    D: Unpin,
    G: Unpin,
    S: Unpin

impl<G, S, D, A> Sync for Lens<G, S, D, A> where
    A: Sync,
    D: Sync,
    G: Sync,
    S: Sync

impl<G, S, D, A> UnwindSafe for Lens<G, S, D, A> where
    A: UnwindSafe,
    D: UnwindSafe,
    G: UnwindSafe,
    S: UnwindSafe

impl<G, S, D, A> RefUnwindSafe for Lens<G, S, D, A> where
    A: RefUnwindSafe,
    D: RefUnwindSafe,
    G: RefUnwindSafe,
    S: RefUnwindSafe

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]