Macro optics::impl_lens

source ·
macro_rules! impl_lens {
    (
        $name:ident as $base:ty => $target:ty $(, for<$($p:ident),+ $(,)?>)?,
        ($s:ident) => by_val: $by_val:expr, by_ref: $by_ref:expr, by_mut: $by_mut:expr $(,)?
    ) => { ... };
    (
        $name:ident as $base:ty => $target:ty $(, for<$($p:ident),+ $(,)?>)?,
        ($s:ident) $(reused($wrap:ident))? => $reused:expr $(,)?
    ) => { ... };
}
Expand description

Similar to declare_lens, but does not define the lens type for you. Normally mark_infallible should be used together with this macro.