pub trait MPrism {
    type Source;
    type Target;

    // Required methods
    fn traverse(&self, source: Self::Source) -> Option<Self::Target>;
    fn re_get(&self, target: Self::Target) -> Self::Source;
}
Expand description

Required Associated Types§

source

type Source

The lens source type, i.e., the object containing the field.

source

type Target

The lens target type, i.e., the field to be accessed or modified.

Required Methods§

source

fn traverse(&self, source: Self::Source) -> Option<Self::Target>

source

fn re_get(&self, target: Self::Target) -> Self::Source

Implementors§

source§

impl<LHS, RHS> MPrism for ComposedMPrism<LHS, RHS>where LHS: MPrism, LHS::Target: 'static, RHS: MPrism<Source = LHS::Target>,

§

type Source = <LHS as MPrism>::Source

§

type Target = <RHS as MPrism>::Target

source§

impl<T> MPrism for IdMPrism<T>

§

type Source = T

§

type Target = T