-
-
Save rylev/8c048d058bd145c585d6b247dec8639f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com::declare! { | |
// A COM interface declared here | |
#[uuid(...)] | |
pub interface IOldSchool { | |
fn foo(); | |
fn bar(); | |
} | |
// A COM class declared here (not defined here) | |
#[uuid(...)] | |
pub class ExternalClass : IOldSchool; | |
// A COM class defined here | |
#[uuid(...)] | |
pub class ExportedClass : IOldSchool { | |
my_field: usize, | |
} | |
// A local COM class defined here (no uuid needed) | |
class LocalClass : IOldSchool {...} | |
} | |
impl ExportedClass { | |
fn foo() { ... } | |
fn bar() { ... } | |
} | |
impl Default for ExportedClass { | |
fn default() -> Self { ... } | |
} | |
impl Default for LocalClass { | |
fn default() -> Self { ... } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment