pub trait ActingClosures<T, U> {
// Required methods
fn apply<F>(self, closure: F) -> U
where F: Fn(T) -> U;
fn also<F>(self, closure: F) -> T
where F: Fn(&T);
}
Expand description
Trait for closures acting on a generic type
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.