pub fn init(&self, content: &Arc<T>) {
        if Arc::strong_count(content) != 1 || Arc::weak_count(content) != 0 {
            panic!("Exclusive access to Arc<T> is required while initializing WeakSelf<T>");
        }
        let weak = Arc::downgrade(content);
        unsafe {
            *self.cell.get() = Some(weak);
        }
    }
/// Initialize the WeakSelf<T> with an Arc.
///
/// Note: content must point be the only existing Arc, otherwise this method will panic
Initialize the WeakSelf with an Arc.
Note: content must point be the only existing Arc, otherwise this method will panic
Initialize the WeakSelf with an Arc . Note : content must point be the only existing Arc otherwise this method will panic
pub fn init(&self, content: &Arc<T>) {
        if Arc::strong_count(content) != 1 || Arc::weak_count(content) != 0 {
            panic!("Exclusive access to Arc<T> is required while initializing WeakSelf<T>");
        }
        let weak = Arc::downgrade(content);
        unsafe {
            *self.cell.get() = Some(weak);
        }
    }
pub fn init ( & self , content : & Arc < T > ) { if Arc :: strong_count ( content ) != 1 || Arc :: weak_count ( content ) != 0 { panic ! ( " " ) ; } let weak = Arc :: downgrade ( content ) ; unsafe { * self . cell . get ( ) = Some ( weak ) ; } }
Initialize the WeakSelf<T> with an Arc.
Initialize the WeakSelf<T > with an Arc .
&self
content
&Arc<T>
&self
content
&Arc<T>