pub trait WithMut<T> {
// Required method
fn with_mut<R>(&mut self, f: impl FnOnce(&mut T) -> R) -> R;
}Expand description
Trait to apply a function to a mutable reference.
Required Methods§
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§
impl<T, WIM: WithInnerMut<T>> WithMut<T> for WIM
Blanket implementation of WithMut for inner mutable types.