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§
fn transform<F, R>(self, f: F) -> Rwhere
F: FnOnce(Self) -> R,
fn modify<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self),
fn inspect<F>(self, f: F) -> Selfwhere
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.