Skip to main content

Lens

Trait Lens 

Source
pub trait Lens: Sized + 'static {
    type Source: Node;
    type Target;

    // Required method
    fn view<'a>(&self, data: &'a Self::Source) -> Self::Target;
}

Required Associated Types§

Required Methods§

Source

fn view<'a>(&self, data: &'a Self::Source) -> Self::Target

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, B> Lens for And<A, B>
where A: Lens, B: Lens<Source = <A as Lens>::Source>,

Source§

type Source = <A as Lens>::Source

Source§

type Target = (<A as Lens>::Target, <B as Lens>::Target)

Source§

impl<A, B> Lens for Then<A, B>
where A: Lens, B: Lens<Source = <A as Lens>::Target>,

Source§

type Source = <A as Lens>::Source

Source§

type Target = <B as Lens>::Target

Source§

impl<T, I> Lens for Index<T, I>
where T: 'static + Index<I>, I: 'static + Clone, <T as Index<I>>::Output: Sized + Clone,

Source§

type Source = T

Source§

type Target = <T as Index<I>>::Output