pub struct ComBox<T: ComClass> { /* private fields */ }
Expand description

Pointer to a COM-enabled Rust struct.

Intercom requires a specific memory layout for the COM objects so that it can implement reference counting and map COM method calls back to the target struct instance.

This is done by requiring each COM-enabled Rust object is constructed through a ComBox<T> type.

Technically the memory layout is specified by the ComBoxData type, however that type shouldn’t be needed by the user. For all intents the ComBox type is the COM-compatible object handle.

Implementations

Constructs a new ComBox by placing the value into reference counted memory.

  • value - The initial state to use for the COM object.

Trait Implementations

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

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

Formats the value using the given formatter. Read more

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

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Decreases the reference count by one. If this is the last reference the memory will be deallocated.

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 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.