pub struct TaggedF;Expand description
Marker type whose P<A, B> = B.
A is phantom — the first argument to dimap is ignored.
This profunctor “tags” a value, supporting construction but not inspection.
Notably, TaggedF is Choice but NOT Strong, which enforces at the type
level that write-only optics (Review) cannot be used for reading.
Trait Implementations§
Source§impl Profunctor for TaggedF
impl Profunctor for TaggedF
fn dimap<A, B, C, D>(
_f: impl Fn(C) -> A + 'static,
g: impl Fn(B) -> D + 'static,
pab: B,
) -> Dwhere
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 TaggedF
impl RefUnwindSafe for TaggedF
impl Send for TaggedF
impl Sync for TaggedF
impl Unpin for TaggedF
impl UnsafeUnpin for TaggedF
impl UnwindSafe for TaggedF
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