Struct librsnek::api::selfref::RefCount [] [src]

pub struct RefCount(pub RefCell<Option<WeakRtObject>>);

RefCount struct that holds a mutable and optional weakref

Trait Implementations

impl Clone for RefCount
[src]

Returns a copy of the value.

Performs copy-assignment from source.

impl SelfRef for RefCount
[src]

Unwrap the optional type and proxy to the underlying WeakRtObject if present

Unwrap the optional type and proxy to the underlying WeakRtObject if present

Set the SelfRef from strong RtObject by cloning and downgrading that

Return a clone of of the backing WeakRtObject

Take the WeakRtObject backing the SelfRef and attempt to upgrade it

impl Debug for RefCount
[src]

Display the strong and weak reference counts

Formats the value using the given formatter.

impl Default for RefCount
[src]

Default to an inner cell value of None meaning that the selfref has not been set

Returns the "default value" for a type.