[][src]Struct druid::lens::Map

pub struct Map<Get, Put> { /* fields omitted */ }

Lens built from a getter and a setter

Implementations

impl<Get, Put> Map<Get, Put>[src]

pub fn new<A: ?Sized, B>(get: Get, put: Put) -> Self where
    Get: Fn(&A) -> B,
    Put: Fn(&mut A, B), 
[src]

Construct a mapping

See also LensExt::map

Trait Implementations

impl<Get: Clone, Put: Clone> Clone for Map<Get, Put>[src]

impl<Get: Copy, Put: Copy> Copy for Map<Get, Put>[src]

impl<Get: Debug, Put: Debug> Debug for Map<Get, Put>[src]

impl<A: ?Sized, B, Get, Put> Lens<A, B> for Map<Get, Put> where
    Get: Fn(&A) -> B,
    Put: Fn(&mut A, B), 
[src]

Auto Trait Implementations

impl<Get, Put> RefUnwindSafe for Map<Get, Put> where
    Get: RefUnwindSafe,
    Put: RefUnwindSafe
[src]

impl<Get, Put> Send for Map<Get, Put> where
    Get: Send,
    Put: Send
[src]

impl<Get, Put> Sync for Map<Get, Put> where
    Get: Sync,
    Put: Sync
[src]

impl<Get, Put> Unpin for Map<Get, Put> where
    Get: Unpin,
    Put: Unpin
[src]

impl<Get, Put> UnwindSafe for Map<Get, Put> where
    Get: UnwindSafe,
    Put: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

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

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.