Struct xpcom::Refcnt [] [src]

pub struct Refcnt(_);

The type of the reference count type for xpcom structs.

#[derive(xpcom)] will use this type for the __refcnt field when #[refcnt = "nonatomic"] is used.

Methods

impl Refcnt
[src]

[src]

Create a new reference count value. This is unsafe as manipulating Refcnt values is an easy footgun.

[src]

Increment the reference count. Returns the new reference count. This is unsafe as modifying this value can cause a use-after-free.

[src]

Decrement the reference count. Returns the new reference count. This is unsafe as modifying this value can cause a use-after-free.

[src]

Get the current value of the reference count.

Trait Implementations

impl Debug for Refcnt
[src]

[src]

Formats the value using the given formatter. Read more