pub struct ComItf<T>where
T: ?Sized,{ /* private fields */ }Expand description
An incoming COM interface pointer.
Intercom will implement the various [com_interface] traits for the
corresponding ComItf<T> type.
This applies only to the pure interfaces. Implicit interfaces created
through #[com_interface] impl MyStruct constructs are not supported for
ComItf<T>.
Implementations§
Source§impl<T: ?Sized> ComItf<T>
impl<T: ?Sized> ComItf<T>
Sourcepub fn new(
automation: InterfacePtr<AutomationTypeSystem, T>,
raw: InterfacePtr<RawTypeSystem, T>,
) -> ComItf<T>
pub fn new( automation: InterfacePtr<AutomationTypeSystem, T>, raw: InterfacePtr<RawTypeSystem, T>, ) -> ComItf<T>
Creates a ComItf<T> from a raw type system COM interface pointer..
Sourcepub fn maybe_new(
automation: Option<InterfacePtr<AutomationTypeSystem, T>>,
raw: Option<InterfacePtr<RawTypeSystem, T>>,
) -> Option<ComItf<T>>
pub fn maybe_new( automation: Option<InterfacePtr<AutomationTypeSystem, T>>, raw: Option<InterfacePtr<RawTypeSystem, T>>, ) -> Option<ComItf<T>>
Creates a ComItf<T> from a raw type system COM interface pointer..
Sourcepub unsafe fn wrap<TS: TypeSystem>(ptr: InterfacePtr<TS, T>) -> ComItf<T>
pub unsafe fn wrap<TS: TypeSystem>(ptr: InterfacePtr<TS, T>) -> ComItf<T>
Creates a ComItf<T> from a raw type system COM interface pointer..
§Safety
The ComItf must not outlast the reference owned by the provided pointer.
Sourcepub fn ptr<TS: TypeSystem>(this: &Self) -> Option<InterfacePtr<TS, T>>
pub fn ptr<TS: TypeSystem>(this: &Self) -> Option<InterfacePtr<TS, T>>
Gets the raw COM pointer from the ComItf<T>.
pub fn as_raw_iunknown(&self) -> &ComItf<dyn RawIUnknown>
pub fn as_iunknown(&self) -> &ComItf<dyn IUnknown>
Source§impl<T: ComInterface + ?Sized> ComItf<T>
impl<T: ComInterface + ?Sized> ComItf<T>
Sourcepub fn query_interface<TTarget: ComInterface + ?Sized>(
this: &Self,
) -> ComResult<ComRc<TTarget>>
pub fn query_interface<TTarget: ComInterface + ?Sized>( this: &Self, ) -> ComResult<ComRc<TTarget>>
Query interface on the ComItf.
pub fn as_rc(this: &Self) -> ComRc<T>
Trait Implementations§
Source§impl<'a, TS: TypeSystem, I> ExternInput<TS> for &'a ComItf<I>
impl<'a, TS: TypeSystem, I> ExternInput<TS> for &'a ComItf<I>
Source§impl<'a, TS: TypeSystem, I> ExternType<TS> for &'a ComItf<I>
impl<'a, TS: TypeSystem, I> ExternType<TS> for &'a ComItf<I>
type ForeignType = Option<InterfacePtr<TS, I>>
Source§impl<I: ComInterface + IAllocator + ?Sized> IAllocator for ComItf<I>
impl<I: ComInterface + IAllocator + ?Sized> IAllocator for ComItf<I>
Source§unsafe fn alloc(&self, len: usize) -> *mut c_void
unsafe fn alloc(&self, len: usize) -> *mut c_void
Allocates a segment of memory that is safe to pass through intercom
interfaces. Read more
Source§unsafe fn alloc_bstr(&self, text: *const u16, len: u32) -> BSTR
unsafe fn alloc_bstr(&self, text: *const u16, len: u32) -> BSTR
Allocates a new BSTR based on an existing string value. Read more
Source§impl<I: ComInterface + IClassFactory + ?Sized> IClassFactory for ComItf<I>
impl<I: ComInterface + IClassFactory + ?Sized> IClassFactory for ComItf<I>
Source§impl<I: ComInterface + IErrorInfo + ?Sized> IErrorInfo for ComItf<I>
impl<I: ComInterface + IErrorInfo + ?Sized> IErrorInfo for ComItf<I>
Source§impl<I: ComInterface + IErrorStore + ?Sized> IErrorStore for ComItf<I>
impl<I: ComInterface + IErrorStore + ?Sized> IErrorStore for ComItf<I>
fn get_error_info(&self) -> ComResult<Option<ComRc<dyn IErrorInfo>>>
fn set_error_info(&self, info: &ComItf<dyn IErrorInfo>) -> ComResult<()>
fn set_error_message(&self, msg: &str) -> ComResult<()>
Source§impl<I: ComInterface + IIntercomCoClass + ?Sized> IIntercomCoClass for ComItf<I>
impl<I: ComInterface + IIntercomCoClass + ?Sized> IIntercomCoClass for ComItf<I>
Source§impl<I: ComInterface + IIntercomInterface + ?Sized> IIntercomInterface for ComItf<I>
impl<I: ComInterface + IIntercomInterface + ?Sized> IIntercomInterface for ComItf<I>
fn get_name(&self) -> ComResult<String>
fn get_options(&self) -> ComResult<InterfaceOptions>
fn get_variant( &self, idx: u32, ) -> ComResult<ComRc<dyn IIntercomInterfaceVariant>>
fn get_variant_count(&self) -> ComResult<u32>
Source§impl<I: ComInterface + IIntercomInterfaceVariant + ?Sized> IIntercomInterfaceVariant for ComItf<I>
impl<I: ComInterface + IIntercomInterfaceVariant + ?Sized> IIntercomInterfaceVariant for ComItf<I>
fn get_iid(&self) -> ComResult<GUID>
fn get_method(&self, idx: u32) -> ComResult<ComRc<dyn IIntercomMethod>>
fn get_method_count(&self) -> ComResult<u32>
fn get_type_system(&self) -> ComResult<TypeSystemName>
Source§impl<I: ComInterface + IIntercomMethod + ?Sized> IIntercomMethod for ComItf<I>
impl<I: ComInterface + IIntercomMethod + ?Sized> IIntercomMethod for ComItf<I>
Source§impl<I: ComInterface + IIntercomTypeInfo + ?Sized> IIntercomTypeInfo for ComItf<I>
impl<I: ComInterface + IIntercomTypeInfo + ?Sized> IIntercomTypeInfo for ComItf<I>
Source§impl<I: ComInterface + IIntercomTypeLib + ?Sized> IIntercomTypeLib for ComItf<I>
impl<I: ComInterface + IIntercomTypeLib + ?Sized> IIntercomTypeLib for ComItf<I>
Source§impl<I: ComInterface + ISupportErrorInfo + ?Sized> ISupportErrorInfo for ComItf<I>
impl<I: ComInterface + ISupportErrorInfo + ?Sized> ISupportErrorInfo for ComItf<I>
Source§impl<I: ComInterface + RawIUnknown + ?Sized> RawIUnknown for ComItf<I>
impl<I: ComInterface + RawIUnknown + ?Sized> RawIUnknown for ComItf<I>
Source§fn query_interface(&self, riid: REFIID) -> RawComResult<RawComPtr>
fn query_interface(&self, riid: REFIID) -> RawComResult<RawComPtr>
Tries to get a different COM interface for the current object. Read more
Source§impl<T: ComInterface + ?Sized> ToOwned for ComItf<T>
impl<T: ComInterface + ?Sized> ToOwned for ComItf<T>
impl<I: ComInterface + IUnknown + ?Sized> IUnknown for ComItf<I>
Auto Trait Implementations§
impl<T> Freeze for ComItf<T>where
T: ?Sized,
impl<T> RefUnwindSafe for ComItf<T>where
T: RefUnwindSafe + ?Sized,
impl<T> !Send for ComItf<T>
impl<T> !Sync for ComItf<T>
impl<T> Unpin for ComItf<T>
impl<T> UnwindSafe for ComItf<T>where
T: UnwindSafe + ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ExternDefault for T
impl<T> ExternDefault for T
Source§unsafe fn extern_default() -> T
unsafe fn extern_default() -> T
Safety Read more