pub struct SmartHandle<T: Copy + Debug> { /* private fields */ }
Expand description

Wrapper struct around underlying native handles Apart from handle it wraps release function that is automatically called when SmartHandle is dropped (see Drop trait implementation).

Implementations

Creates SmartHandle from underlying native handle and respective release function.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Calls release function when handle is being dropped This ensures underlying native resources are released properly.

Executes the destructor for this type. Read more

Send implementation so that we can send SmartHandles accross threads.

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.

Converts the given value to a String. 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.