Trait RefCounterMethods

Source
pub trait RefCounterMethods: WxRustMethods {
    // Provided methods
    fn dec_ref(&self) { ... }
    fn get_ref_count(&self) -> c_int { ... }
    fn inc_ref(&self) { ... }
}
Expand description

This trait represents C++ wxRefCounter class’s methods and inheritance.

See RefCounterIsOwned documentation for the class usage.

Provided Methods§

Source

fn dec_ref(&self)

Decrements the reference count associated with this shared data and, if it reaches zero, destroys this instance of wxRefCounter releasing its memory.

See C++ wxRefCounter::DecRef()’s documentation.

Source

fn get_ref_count(&self) -> c_int

Returns the reference count associated with this shared data.

See C++ wxRefCounter::GetRefCount()’s documentation.

Source

fn inc_ref(&self)

Increments the reference count associated with this shared data.

See C++ wxRefCounter::IncRef()’s documentation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const OWNED: bool> RefCounterMethods for RefCounterIsOwned<OWNED>