pub struct Poly<F>(pub F);Expand description
The Func trait from frunk doesn’t take self as a parameter to call so there isn’t an easy way to get context
from the surrounding scope. Here we define our own Poly wrapper and Func trait that does take self as a
parameter so the caller can include whatever context they need.
Tuple Fields§
§0: FTrait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Poly<F>where
F: Freeze,
impl<F> RefUnwindSafe for Poly<F>where
F: RefUnwindSafe,
impl<F> Send for Poly<F>where
F: Send,
impl<F> Sync for Poly<F>where
F: Sync,
impl<F> Unpin for Poly<F>where
F: Unpin,
impl<F> UnwindSafe for Poly<F>where
F: 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