pub struct FnP;Expand description
Marker type whose P<A, B> is Box<dyn Fn(A) -> B>.
This is the canonical Profunctor instance: the function arrow.
Trait Implementations§
Source§impl Profunctor for FnP
impl Profunctor for FnP
fn dimap<A, B, C, D>(
f: impl Fn(C) -> A + 'static,
g: impl Fn(B) -> D + 'static,
pab: Box<dyn Fn(A) -> B>,
) -> Box<dyn Fn(C) -> D>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,
Auto Trait Implementations§
impl Freeze for FnP
impl RefUnwindSafe for FnP
impl Send for FnP
impl Sync for FnP
impl Unpin for FnP
impl UnsafeUnpin for FnP
impl UnwindSafe for FnP
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