[src]

Struct sync::Weak

pub struct Weak<T> {
    // some fields omitted
}

A weak pointer to an Arc.

Weak pointers will not keep the data inside of the Arc alive, and can be used to break cycles between Arc pointers.

Methods

impl<T: Share + Send> Weak<T>

fn upgrade(&self) -> Option<Arc<T>>

Attempts to upgrade this weak reference to a strong reference.

This method will fail to upgrade this reference if the strong reference count has already reached 0, but if there are still other active strong references this function will return a new strong reference to the data

Trait Implementations

impl<T: Share + Send> Clone for Weak<T>

fn clone(&self) -> Weak<T>

impl<T: Share + Send> Drop for Weak<T>

fn drop(&mut self)