Skip to main content

ScopedWith

Trait ScopedWith 

Source
pub trait ScopedWith<T = ()> {
    // Required methods
    fn begin(&mut self, value: &T);
    fn end(&mut self);

    // Provided method
    fn scope<F, R>(&mut self, value: T, f: F) -> R
       where F: FnOnce(T) -> R { ... }
}

Required Methods§

Source

fn begin(&mut self, value: &T)

Source

fn end(&mut self)

Provided Methods§

Source

fn scope<F, R>(&mut self, value: T, f: F) -> R
where F: FnOnce(T) -> R,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S> ScopedWith for S
where S: Scoped,