//! A helper crate for consuming and producing COM interfaces.
//!
//! # Example
//!
//! To work with a COM interface it must first be declared:
//!
//! ```rust,no_run
//! /// Define an IAnimal interface
//! com::interfaces! {
//! #[uuid("EFF8970E-C50F-45E0-9284-291CE5A6F771")]
//! pub unsafe interface IAnimal: com::interfaces::IUnknown {
//! unsafe fn Eat(&self) -> com::sys::HRESULT;
//! }
//! }
//! # fn main() {}
//! ```
//!
//! To define a COM implementation class:
//!
//! ```rust,no_run
//! # com::interfaces! {
//! # #[uuid("EFF8970E-C50F-45E0-9284-291CE5A6F771")]
//! # pub unsafe interface IAnimal: com::interfaces::IUnknown {
//! # unsafe fn Eat(&self) -> com::sys::HRESULT;
//! # }
//! # }
//! com::class! {
//! pub class BritishShortHairCat: IAnimal {
//! num_owners: u32,
//! }
//!
//! impl IAnimal for BritishShortHairCat {
//! fn Eat(&self) -> com::sys::HRESULT {
//! println!("Eating...");
//! com::sys::NOERROR
//! }
//! }
//! }
//! # fn main() {}
//! ```
//!
//! See the examples directory in the repository for more examples.
//!
/// Functionality for producing COM classes
pub use AbiTransferable;
pub use Interface;
pub use Param;
pub use ;
/// Declare COM interfaces
///
/// # Example
/// ```rust,no_run
/// /// Define an IAnimal interface
/// com::interfaces! {
/// #[uuid("EFF8970E-C50F-45E0-9284-291CE5A6F771")]
/// pub unsafe interface IAnimal: com::interfaces::IUnknown {
/// unsafe fn Eat(&self) -> com::sys::HRESULT;
/// }
/// }
/// # fn main() {}
/// ```
pub use interfaces;
/// Declare COM implementation classes
///
/// # Example
/// ```rust,no_run
/// use com::sys::{HRESULT, NOERROR};
/// # com::interfaces! {
/// # #[uuid("EFF8970E-C50F-45E0-9284-291CE5A6F771")]
/// # pub unsafe interface IAnimal: com::interfaces::IUnknown {
/// # unsafe fn Eat(&self) -> com::sys::HRESULT;
/// # }
/// # }
///
/// com::class! {
/// pub class BritishShortHairCat: IAnimal {
/// num_owners: u32,
/// }
///
/// impl IAnimal for BritishShortHairCat {
/// fn Eat(&self) -> HRESULT {
/// println!("Eating...");
/// NOERROR
/// }
/// }
/// }
/// # fn main() {}
/// ```
pub use class;
// this allows for the crate to refer to itself as `com` to keep macros consistent
// whether they are used by some other crate or internally
extern crate self as com;
// We re-export `alloc` so that we can use `com::alloc::boxed::Box` in generated code,
// for code that uses `#![no_std]`.
pub extern crate alloc;