pub trait CallOn<T>: CallInto<T> {
// Required method
fn call_on<F>(&self, f: F) -> Self::Output
where F: FnMut(&T) -> Self::Output;
}
Expand description
The CallOn
trait enables an object to be passed onto a unary, or single value, function
that is applied to the object.
Required 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.