Skip to content

Commit

Permalink
Improve implement macro docs (#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
daladim authored Feb 27, 2024
1 parent 148f4eb commit 503dd9f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/libs/implement/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ use quote::{quote, ToTokens};
/// Implements one or more COM interfaces.
///
/// # Example
///
/// Here is a [more complete tutorial](https://kennykerr.ca/rust-getting-started/how-to-implement-com-interface.html).
///
/// ```rust,ignore
/// #[interface("094d70d6-5202-44b8-abb8-43860da5aca2")]
/// unsafe trait IValue: IUnknown {
Expand All @@ -24,8 +27,9 @@ use quote::{quote, ToTokens};
/// }
///
/// fn main() {
/// let object: IValue = Value(123).into();
/// // Call interface methods...
/// let rust_instance = Value(123);
/// let com_object: IValue = rust_instance.into();
/// // You can now call interface methods on com_object.
/// }
/// ```
#[proc_macro_attribute]
Expand Down

0 comments on commit 503dd9f

Please sign in to comment.