extend_ref

Function extend_ref 

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

Returns reference with lifetime of value

ยงSafety

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