pub struct ComRc<T: ComInterface + ?Sized> { /* private fields */ }
Expand description

Reference counted handle to the ComBox data.

Provides a safe way to handle the unsafe ComBox values.

Implementations

Attaches a floating ComItf reference and brings it under managed reference counting.

Does not increment the reference count.

Safety

Given this does not increment the reference count, it must be used only if the ComItf is one that would leave the reference dangling. If something already owns the ComItf and will do release on it, the drop of the returned ComRc will result in a double-release.

Attaches a floating ComItf reference and brings it under managed reference counting.

Does not increment the reference count.

Creates a ComItf<T> from a raw type system COM interface pointer..

Does not increment the reference count.

Safety

The ptr must be owned by us. wrap will not call add_ref on the ptr.

Methods from Deref<Target = ComItf<T>>

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

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

Safety 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 resulting type after obtaining ownership.

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

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.