Trait ApplyFunction

Source
pub trait ApplyFunction<T> {
    // Required method
    fn apply_fn(&self, fn_to_apply: Box<dyn Fn(&T) -> T>) -> Self;
}
Expand description

Macro for executing a closure on an object more easily

Required Methods§

Source

fn apply_fn(&self, fn_to_apply: Box<dyn Fn(&T) -> T>) -> Self

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.

Implementations on Foreign Types§

Source§

impl<T> ApplyFunction<T> for Vec<T>

Source§

fn apply_fn(&self, fn_to_apply: Box<dyn Fn(&T) -> T>) -> Self

Implementors§