pub trait StaticRefMutFunction<'a, D, T> {
type Output;
// Required method
fn call_mut(data: &'a mut D, arg: T) -> Self::Output;
// Provided methods
fn bind(data: &'a mut D) -> RefFnMut<'a, T, Self::Output> { ... }
fn bind_send(data: &'a mut D) -> RefSendFnMut<'a, T, Self::Output>
where D: Send { ... }
}
Expand description
A trait for defining a static function that will be type erased.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn bind(data: &'a mut D) -> RefFnMut<'a, T, Self::Output>
fn bind(data: &'a mut D) -> RefFnMut<'a, T, Self::Output>
A helper function to create a RefFnMut
object with the defined function.
Sourcefn bind_send(data: &'a mut D) -> RefSendFnMut<'a, T, Self::Output>where
D: Send,
fn bind_send(data: &'a mut D) -> RefSendFnMut<'a, T, Self::Output>where
D: Send,
A helper function to create a RefSendFnMut
object with the defined function.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.