extend_mut

Function extend_mut 

Source
pub unsafe fn extend_mut<'a, T: 'a>(target: &mut T) -> &'a mut T
Expand description

Returns mutable reference with lifetime of value

ยงSafety

  • You must not move original variable
  • You must not create mutable reference while having immutable references
  • You must not create multiple mutable reference
  • The reference must not outlive