pub trait Apply<T, U> {
type Output;
// Required method
fn apply<F>(self, f: F) -> Self::Output
where F: FnOnce(T) -> U;
}
Expand description
[ApplyOnce] describes objects capable of applying, or mapping, a function onto a value.
Required Associated Types§
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.