use crate::{LensOver, LensView}; #[allow(non_camel_case_types)] pub struct id; impl LensView for T { type Field = T; fn view(thing: T) -> Self::Field { thing } } impl LensOver for T { fn over(thing: T, f: F) -> T where F: FnOnce(Self::Field) -> Self::Field, { f(thing) } }