Function through::through

source ·
pub fn through<T>(elem: &mut T, func: impl FnOnce(T) -> T)
Expand description

Mutate a referenced element by transferring ownership through a function.