Struct im::map::MapLens
[−]
[src]
pub struct MapLens<K, V> { /* fields omitted */ }
Trait Implementations
impl<K, V> Clone for MapLens<K, V>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<K, V> PartialLens for MapLens<K, V> where
K: Ord,
[src]
K: Ord,
type From = Map<K, V>
type To = V
fn try_get<R>(&self, s: R) -> Option<Arc<V>> where
R: AsRef<Map<K, V>>,
R: AsRef<Map<K, V>>,
Get the focus of the lens, if available.
fn try_put<Convert, R>(&self, cv: Option<Convert>, s: R) -> Option<Map<K, V>> where
R: AsRef<Map<K, V>>,
Arc<V>: From<Convert>,
R: AsRef<Map<K, V>>,
Arc<V>: From<Convert>,
Put a value into the lens, returning the updated From
value is the operation succeeded. Read more
fn try_chain<L, Next>(
&self,
next: &L
) -> Compose<Self::From, Self::To, Next, Self, L> where
L: PartialLens<From = Self::To, To = Next>,
&self,
next: &L
) -> Compose<Self::From, Self::To, Next, Self, L> where
L: PartialLens<From = Self::To, To = Next>,
Compose this lens with a lens from To
to a new type Next
, yielding a lens from From
to Next
. Read more