/// Lets the user use the last reference for some time, and discards it completely.
/// After the user uses it, the next time they inspect the [`RecRef`], it won't be there.
/// If the [`RecRef`] has only one reference left, this returns `None`, because
/// the [`RecRef`] can't be empty.
Lets the user use the last reference for some time, and discards it completely.
After the user uses it, the next time they inspect the [`RecRef`], it won't be there.
Lets the user use the last reference for some time and discards it completely . After the user uses it the next time they inspect the [ ` RecRef ` ] it won ' t be there .
pub fn pop(rec_ref: &mut Self) -> Option<&mut T> {
        // Safety:
        // This pointer was produced from a `&mut T`.
        //
        // By RecRef's safety invariant, this reference can be used.
        // Whenever it's used, `rec_ref` is frozen, preventing further
        // access until this reference is dropped.
        let res = unsafe { rec_ref.head.as_mut() };
        rec_ref.head = rec_ref.vec.pop()?; // We can't pop the original reference. In that case, Return None.
        Some(res)
    }
pub fn pop ( rec_ref : & mut Self ) -> Option < & mut T > { // Safety: // This pointer was produced from a `&mut T`. // // By RecRef's safety invariant, this reference can be used. // Whenever it's used, `rec_ref` is frozen, preventing further // access until this reference is dropped. let res = unsafe { rec_ref . head . as_mut ( ) } ; rec_ref . head = rec_ref . vec . pop ( ) ? ; // We can't pop the original reference. In that case, Return None. Some ( res ) }
Lets the user use the last reference for some time, and discards it completely.
Lets the user use the last reference for some time and discards it completely .
rec_ref
&mut Self