pub struct UntypedResourceInfo {
    pub layout: Layout,
    pub cell: Arc<AtomicRefCell<*mut u8>>,
    pub clone_fn: unsafe extern "C" fn(_: *const u8, _: *mut u8),
    pub drop_fn: Option<unsafe extern "C" fn(_: *mut u8)>,
}
Expand description

Used to construct an UntypedResource.

Fields§

§layout: Layout

The memory layout of the resource

§cell: Arc<AtomicRefCell<*mut u8>>

Cell containing the raw pointer to the resource’s data

§clone_fn: unsafe extern "C" fn(_: *const u8, _: *mut u8)

A function that may be called to clone the resource from one pointer to another.

§drop_fn: Option<unsafe extern "C" fn(_: *mut u8)>

An optional function that will be called to drop the resource.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.