Function call_by::to_mut[][src]

pub fn to_mut<'a, T: By<'a, Mut>>(by_mut: T::Type) -> &'a mut T

Safe, zero-cost cast from <T as By<'a, Mut>>::Type to &'a mut T.

Rust’s type system does not always know that <T as By<'a, Mut>>::Type is &'a mut T for all 'a. This function safely converts from the former to the latter.