pub struct FnNat<F>(pub F);Expand description
Wrapper that adapts a Fn(u64) -> R closure into a NatCallback.
Inside the dispatch, the const generic N is passed to the closure as
a plain u64. This loses the ability to construct types parameterized
by N, but covers the common case where you just need the value.
Prefer reify_nat_fn which uses this internally.
Tuple Fields§
§0: FTrait Implementations§
Auto Trait Implementations§
impl<F> Freeze for FnNat<F>where
F: Freeze,
impl<F> RefUnwindSafe for FnNat<F>where
F: RefUnwindSafe,
impl<F> Send for FnNat<F>where
F: Send,
impl<F> Sync for FnNat<F>where
F: Sync,
impl<F> Unpin for FnNat<F>where
F: Unpin,
impl<F> UnsafeUnpin for FnNat<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FnNat<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