Trait ScopeFunc

Source
pub trait ScopeFunc: Sized {
    // Provided methods
    fn transform<F, R>(self, f: F) -> R
       where F: FnOnce(Self) -> R { ... }
    fn modify<F>(self, f: F) -> Self
       where F: FnOnce(&mut Self) { ... }
    fn inspect<F>(self, f: F) -> Self
       where F: FnOnce(&Self) { ... }
}

Provided Methods§

Source

fn transform<F, R>(self, f: F) -> R
where F: FnOnce(Self) -> R,

Source

fn modify<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Source

fn inspect<F>(self, f: F) -> Self
where F: FnOnce(&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.

Implementors§

Source§

impl<T> ScopeFunc for T