pub trait StaticRefFunction<'a, D, T> {
type Output;
// Required method
fn call(data: &'a D, arg: T) -> Self::Output;
// Provided methods
fn bind(data: &'a D) -> RefFn<'a, T, Self::Output> { ... }
fn bind_sync(data: &'a D) -> RefSyncFn<'a, T, Self::Output>
where D: Sync { ... }
}
Expand description
A trait for defining a static function will be type erased.
Required Associated Types§
Required Methods§
Provided Methods§
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.