Skip to main content

ValueLens

Trait ValueLens 

Source
pub trait ValueLens: Lens {
    // Required method
    fn get(&self, source: &Self::Source) -> Self::Target;
}
Expand description

A lens that allows the target to be accessed only by cloning or copying the target value.

Required Methods§

Source

fn get(&self, source: &Self::Source) -> Self::Target

Gets a copy of the lens target. (This does not consume the source.)

Implementations on Foreign Types§

Source§

impl<L: ValueLens + ?Sized> ValueLens for Box<L>

Source§

fn get(&self, source: &L::Source) -> L::Target

Implementors§

Source§

impl<LHS, RHS> ValueLens for ComposedLens<LHS, RHS>
where LHS: RefLens, LHS::Target: 'static, RHS: ValueLens<Source = LHS::Target>,