pub trait Wrap: Sized {
// Provided methods
fn wrap_ref<F>(self, wrap: F) -> Self
where F: FnOnce(&Self) { ... }
fn wrap_mut<F>(self, wrap: F) -> Self
where F: FnOnce(&mut Self) { ... }
fn wrap_map<F, R>(self, wrap: F) -> R
where F: FnOnce(Self) -> R { ... }
}Expand description
Provided Methods§
Sourcefn wrap_ref<F>(self, wrap: F) -> Selfwhere
F: FnOnce(&Self),
fn wrap_ref<F>(self, wrap: F) -> Selfwhere
F: FnOnce(&Self),
Turns a self reference function call into an ‘inline’/‘builder’ call.
This function normally isn’t needed, if you need to access a value
you can use Peep.
Theres normally something wrong with the library if you need to use
this.
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.