Trait ext_php_rs::rc::PhpRc

source ·
pub trait PhpRc {
    // Required methods
    fn get_rc(&self) -> &ZendRefcount;
    fn get_rc_mut(&mut self) -> &mut ZendRefcount;

    // Provided methods
    fn get_count(&self) -> u32 { ... }
    fn inc_count(&mut self) { ... }
    fn dec_count(&mut self) { ... }
}
Expand description

Implemented on refcounted types.

Required Methods§

source

fn get_rc(&self) -> &ZendRefcount

Returns an immutable reference to the corresponding refcount object.

source

fn get_rc_mut(&mut self) -> &mut ZendRefcount

Returns a mutable reference to the corresponding refcount object.

Provided Methods§

source

fn get_count(&self) -> u32

Returns the number of references to the object.

source

fn inc_count(&mut self)

Increments the reference counter by 1.

source

fn dec_count(&mut self)

Decrements the reference counter by 1.

Implementors§