Struct cglue::arc::CArc[][src]

#[repr(C)]
pub struct CArc<T: Sized + 'static> { /* fields omitted */ }
Expand description

FFI-Safe Arc

This is an FFI-Safe equivalent of Arc and Option<Arc>.

Implementations

Take arc’s resources, and leave None in its place.

Examples
use cglue::arc::CArc;

let mut arc = CArc::from(0u64);

assert!(arc.as_ref().is_some());

let arc2 = arc.take();

assert!(arc2.as_ref().is_some());
assert!(arc.as_ref().is_none());

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Transform self into an opaque version of the trait object. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.