pub fn lift<'a, F>(this: Self, fun: F) -> Option<Self>
    where
        T: 'a,
        F: FnOnce(&'a Self) -> &'a mut Option<Self>,
    { 
        let slot = {
            //  Safety:
            //  -   Even though the lifetime of `this_ref` and `this` was "unlinked" by going through a pointer,
            //      `this_ref` will notbe used after moving `this`, and therefore will remain valid throughout its used.
            let this_ref = unsafe { &*(&this as *const _) };
    
            fun(this_ref) as *mut Option<Self>
        };
    
        //  Safety:
        //  -   Even though the lifetime of `slot` and `this` was "unlinked" by going through a pointer, `slot` is
        //      still validfor the duration of this function because `this` is not destroyed, and therefore its
        //      pointee is still alive.
        let slot = unsafe { &mut *slot };
    
        slot.replace(this)
    }
/// Lifts `this` into the slot provided by `fun`; returns the previous value of the slot, if any.
///
/// This function is useful, for example, to "tie the knot" when appending 2 linked-lists: it is easy to splice the
/// the head of the back linked-list at the back of the front linked-list, but then one has lost the head pointer
/// and can no longer splice the tail of the front linked-list to it.
Lifts `this` into the slot provided by `fun`; returns the previous value of the slot, if any.
This function is useful, for example, to "tie the knot" when appending 2 linked-lists: it is easy to splice the
the head of the back linked-list at the back of the front linked-list, but then one has lost the head pointer
and can no longer splice the tail of the front linked-list to it.
Lifts ` this ` into the slot provided by ` fun ` ; returns the previous value of the slot if any . This function is useful for example to " tie the knot " when appending 2 linked - lists : it is easy to splice the the head of the back linked - list at the back of the front linked - list but then one has lost the head pointer and can no longer splice the tail of the front linked - list to it .
pub fn lift<'a, F>(this: Self, fun: F) -> Option<Self>
    where
        T: 'a,
        F: FnOnce(&'a Self) -> &'a mut Option<Self>,
    { 
        let slot = {
            //  Safety:
            //  -   Even though the lifetime of `this_ref` and `this` was "unlinked" by going through a pointer,
            //      `this_ref` will notbe used after moving `this`, and therefore will remain valid throughout its used.
            let this_ref = unsafe { &*(&this as *const _) };
            fun(this_ref) as *mut Option<Self>
        };
        //  Safety:
        //  -   Even though the lifetime of `slot` and `this` was "unlinked" by going through a pointer, `slot` is
        //      still validfor the duration of this function because `this` is not destroyed, and therefore its
        //      pointee is still alive.
        let slot = unsafe { &mut *slot };
        slot.replace(this)
    }
pub fn lift < ' a , F > ( this : Self , fun : F ) -> Option < Self > where T : ' a , F : FnOnce ( & ' a Self ) -> & ' a mut Option < Self > , { let slot = { //  Safety: //  -   Even though the lifetime of `this_ref` and `this` was "unlinked" by going through a pointer, //      `this_ref` will notbe used after moving `this`, and therefore will remain valid throughout its used. let this_ref = unsafe { & * ( & this as * const _ ) } ; fun ( this_ref ) as * mut Option < Self > } ; //  Safety: //  -   Even though the lifetime of `slot` and `this` was "unlinked" by going through a pointer, `slot` is //      still validfor the duration of this function because `this` is not destroyed, and therefore its //      pointee is still alive. let slot = unsafe { & mut * slot } ; slot . replace ( this ) }
Lifts `this` into the slot provided by `fun`; returns the previous value of the slot, if any.
Lifts ` this ` into the slot provided by ` fun ` ; returns the previous value of the slot if any .
this
Self
fun
F
this
Self
fun
F