Struct simple_ref_fn::RefSendFnMut
source · pub struct RefSendFnMut<'a, T, R> { /* private fields */ }Expand description
A simple function wrapper that behaves like a &mut (dyn FnMut(T) -> R + Send) type, but does not
require a virtual table.
Implementations§
source§impl<'a, T, R> RefSendFnMut<'a, T, R>
impl<'a, T, R> RefSendFnMut<'a, T, R>
sourcepub fn new<F, D>(data: &'a mut D) -> Selfwhere
F: StaticRefMutFunction<'a, D, T, Output = R> + ?Sized,
D: Send,
pub fn new<F, D>(data: &'a mut D) -> Selfwhere
F: StaticRefMutFunction<'a, D, T, Output = R> + ?Sized,
D: Send,
Create a RefSendFnMut object by binding F::call_mut function with
data.
sourcepub fn from_fn_mut<F>(f: &'a mut F) -> Selfwhere
F: FnMut(T) -> R + Send,
pub fn from_fn_mut<F>(f: &'a mut F) -> Selfwhere
F: FnMut(T) -> R + Send,
Create a RefSendFnMut object from a function reference.