Function with_mut

Source
pub fn with_mut<R, T>(receiver: &mut R, closure: impl FnOnce(&mut R) -> T) -> T
Expand description

Calls the specified closure with the given mutable receiver and returns its result.