pub trait LensExt: Lens {
// Provided methods
fn or<Other>(self, other: Other) -> OrLens<Self, Other>
where Other: Lens<Target = bool>,
Self: Lens<Target = bool> { ... }
fn and<Other>(self, other: Other) -> AndLens<Self, Other>
where Other: Lens<Target = bool>,
Self: Lens<Target = bool> { ... }
fn then<Other>(self, other: Other) -> Then<Self, Other>
where Other: Lens<Source = Self::Target> { ... }
fn idx<T>(self, index: usize) -> Index<Self, T>
where T: 'static,
Self::Target: Deref<Target = [T]> { ... }
fn map<O, F>(self, map: F) -> Map<Self, O>
where O: 'static,
F: 'static + Fn(&Self::Target) -> O { ... }
fn map_ref<O, F>(self, map: F) -> MapRef<Self, O>
where O: 'static,
F: 'static + Fn(&Self::Target) -> &O { ... }
fn unwrap<T>(self) -> Then<Self, UnwrapLens<T>>
where T: 'static,
Self: Lens<Target = Option<T>> { ... }
fn into_lens<T>(self) -> Then<Self, IntoLens<Self::Target, T>>
where T: 'static,
Self::Target: Clone + Into<T> { ... }
}
Expand description
Helpers for constructing more complex Lens
es.
Provided Methods§
fn or<Other>(self, other: Other) -> OrLens<Self, Other>
fn and<Other>(self, other: Other) -> AndLens<Self, Other>
fn idx<T>(self, index: usize) -> Index<Self, T>
fn map<O, F>(self, map: F) -> Map<Self, O>
fn map_ref<O, F>(self, map: F) -> MapRef<Self, O>
fn unwrap<T>(self) -> Then<Self, UnwrapLens<T>>
fn into_lens<T>(self) -> Then<Self, IntoLens<Self::Target, T>>
Object Safety§
This trait is not object safe.