Skip to content

Commit

Permalink
Adding documentation for factory (#1936)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenJKuhn committed Jul 22, 2022
1 parent b71db73 commit a84560c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/libs/windows/src/core/factory_cache.rs
Expand Up @@ -47,7 +47,8 @@ impl<C: RuntimeName, I: Interface> FactoryCache<C, I> {
// This is safe because `FactoryCache` only holds agile factory pointers, which are safe to cache and share between threads.
unsafe impl<C, I> ::core::marker::Sync for FactoryCache<C, I> {}

/// Attempts to load the factory interface for the given WinRT class
/// Attempts to load the factory object for the given WinRT class.
/// This can be used to access COM interfaces implemented on a Windows Runtime class factory.
pub fn factory<C: RuntimeName, I: Interface>() -> Result<I> {
let mut factory: Option<I> = None;
let name = HSTRING::from(C::NAME);
Expand Down
1 change: 0 additions & 1 deletion crates/libs/windows/src/core/mod.rs
Expand Up @@ -38,7 +38,6 @@ pub use compose::*;
pub(crate) use delay_load::*;
pub use error::*;
pub use event::*;
#[doc(hidden)]
pub use factory_cache::*;
#[doc(hidden)]
pub use generic_factory::*;
Expand Down

0 comments on commit a84560c

Please sign in to comment.