pub struct ForgetF<R>(/* private fields */);Expand description
Marker type whose P<A, B> = Box<dyn Fn(A) -> R>.
B is phantom — the second argument to dimap is ignored.
This profunctor “forgets” the output and extracts a summary value.
Trait Implementations§
Source§impl<R> Profunctor for ForgetF<R>where
R: 'static,
impl<R> Profunctor for ForgetF<R>where
R: 'static,
fn dimap<A, B, C, D>(
f: impl Fn(C) -> A + 'static,
_g: impl Fn(B) -> D + 'static,
pab: Box<dyn Fn(A) -> R>,
) -> Box<dyn Fn(C) -> R>where
A: 'static,
B: 'static,
fn lmap<A, B, C>(
f: impl Fn(C) -> A + 'static,
pab: Self::P<A, B>,
) -> Self::P<C, B>where
A: 'static,
B: 'static,
fn rmap<A, B, D>(
g: impl Fn(B) -> D + 'static,
pab: Self::P<A, B>,
) -> Self::P<A, D>where
A: 'static,
B: 'static,
Source§impl<R> Traversing for ForgetF<R>where
R: Monoid + 'static,
impl<R> Traversing for ForgetF<R>where
R: Monoid + 'static,
Auto Trait Implementations§
impl<R> Freeze for ForgetF<R>
impl<R> RefUnwindSafe for ForgetF<R>where
R: RefUnwindSafe,
impl<R> Send for ForgetF<R>where
R: Send,
impl<R> Sync for ForgetF<R>where
R: Sync,
impl<R> Unpin for ForgetF<R>where
R: Unpin,
impl<R> UnsafeUnpin for ForgetF<R>
impl<R> UnwindSafe for ForgetF<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more