Trait Action

Source
pub trait Action<T, R> {
    // Required method
    fn execute(self, on: T) -> R;
}
Expand description

A generic way of performing an action on some type

Required Methods§

Source

fn execute(self, on: T) -> R

Executes some action on a value of type T

Implementors§

Source§

impl<T, R, F> Action<T, R> for F
where F: FnOnce(T) -> R,