Trait Lens

Source
pub trait Lens: PartialLens
where Self::AtInitial: Lens, Self::AtFinal: Lens,
{ // Required method fn get(&self, v: Self::InitialSource) -> Self::InitialTarget; }
Expand description

The supertype of all lens families.

Required Methods§

Source

fn get(&self, v: Self::InitialSource) -> Self::InitialTarget

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, S, A, T, B> Lens for ConvMut<'a, S, A, T, B>
where S: AsMut<A> + 'a + ?Sized, A: AsMut<S> + 'a + ?Sized, T: AsMut<B> + 'a + ?Sized, B: AsMut<T> + 'a + ?Sized,

Source§

impl<'a, S, A, T, B> Lens for ConvRef<'a, S, A, T, B>
where S: AsRef<A> + 'a + ?Sized, A: AsRef<S> + 'a + ?Sized, T: AsRef<B> + 'a + ?Sized, B: AsRef<T> + 'a + ?Sized,

Source§

impl<L: Iso> Lens for Invert<L>
where L::AtInitial: Iso, L::AtFinal: Iso,

Source§

impl<LF: Lens, LS> Lens for Compose<LF, LS>
where LS: Lens<InitialTarget = LF::InitialSource, FinalTarget = LF::FinalSource> + ?Sized, LF::AtInitial: Lens, LF::AtFinal: Lens, LS::AtInitial: Lens, LS::AtFinal: Lens,

Source§

impl<S> Lens for ToUnit<S>

Source§

impl<S, A, T, B> Lens for Conv<S, A, T, B>
where S: Into<A>, A: Into<S>, B: Into<T>, T: Into<B>,

Source§

impl<S, T> Lens for Identity<S, T>