Previously #[com_impl] was needed for constructing the struct specific virtual table as it was the one place where the Rust syntax exposed the struct, the interface and the functions.
The changes here manage to do that in #[com_interface] and #[com_class] by creating generic prototype methods in the #[com_interface], which are then instantiated in #[com_class] with the help of the ComClassInterface trait, which is able to communicate the correct virtual table offsets back to #[com_interface] expansion.
Closes #160
Also adds support for generic ComClasses (for example #[com_class] struct ClassFactory<T>).
Previously
#[com_impl]
was needed for constructing the struct specific virtual table as it was the one place where the Rust syntax exposed the struct, the interface and the functions.The changes here manage to do that in
#[com_interface]
and#[com_class]
by creating generic prototype methods in the#[com_interface]
, which are then instantiated in#[com_class]
with the help of theComClassInterface
trait, which is able to communicate the correct virtual table offsets back to#[com_interface]
expansion.Closes #160
Also adds support for generic ComClasses (for example
#[com_class] struct ClassFactory<T>
).