pub struct RefFn<'a, T, R> { /* private fields */ }
Expand description
A simple function wrapper that behaves like a &dyn Fn(T) -> R
type, but does not require a virtual table.
Implementations§
Trait Implementations§
impl<T, R> Copy for RefFn<'_, T, R>
Auto Trait Implementations§
impl<'a, T, R> Freeze for RefFn<'a, T, R>
impl<'a, T, R> RefUnwindSafe for RefFn<'a, T, R>
impl<'a, T, R> !Send for RefFn<'a, T, R>
impl<'a, T, R> !Sync for RefFn<'a, T, R>
impl<'a, T, R> Unpin for RefFn<'a, T, R>
impl<'a, T, R> UnwindSafe for RefFn<'a, T, R>
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