Skip to main content

IObservableMap

Struct IObservableMap 

Source
pub struct IObservableMap<K, V>(/* private fields */)
where
    K: RuntimeType + 'static,
    V: RuntimeType + 'static;

Implementations§

Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> IObservableMap<K, V>

Source

pub fn MapChanged<F>(&self, handler: F) -> Result<EventRevoker>
where F: Fn(Ref<'_, Self>, Ref<'_, IMapChangedEventArgs<K>>) + Send + 'static,

Source

pub fn First(&self) -> Result<IIterator<IKeyValuePair<K, V>>>

Source

pub fn Lookup<P0>(&self, key: P0) -> Result<V>
where P0: Param<K>,

Source

pub fn Size(&self) -> Result<u32>

Source

pub fn HasKey<P0>(&self, key: P0) -> Result<bool>
where P0: Param<K>,

Source

pub fn GetView(&self) -> Result<IMapView<K, V>>

Source

pub fn Insert<P0, P1>(&self, key: P0, value: P1) -> Result<bool>
where P0: Param<K>, P1: Param<V>,

Source

pub fn Remove<P0>(&self, key: P0) -> Result<()>
where P0: Param<K>,

Source

pub fn Clear(&self) -> Result<()>

Trait Implementations§

Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> CanInto<IInspectable> for IObservableMap<K, V>

Source§

const QUERY: bool = false

Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> CanInto<IIterable<IKeyValuePair<K, V>>> for IObservableMap<K, V>

Source§

const QUERY: bool = true

Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> CanInto<IMap<K, V>> for IObservableMap<K, V>

Source§

const QUERY: bool = true

Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> CanInto<IUnknown> for IObservableMap<K, V>

Source§

const QUERY: bool = false

Source§

impl<K, V> Clone for IObservableMap<K, V>
where K: RuntimeType + 'static + Clone, V: RuntimeType + 'static + Clone,

Source§

fn clone(&self) -> IObservableMap<K, V>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K, V> Debug for IObservableMap<K, V>
where K: RuntimeType + 'static + Debug, V: RuntimeType + 'static + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K, V> Eq for IObservableMap<K, V>
where K: RuntimeType + 'static + Eq, V: RuntimeType + 'static + Eq,

Source§

impl<K, V> From<BTreeMap<<K as Type<K>>::Default, <V as Type<V>>::Default>> for IObservableMap<K, V>
where K: RuntimeType, V: RuntimeType, K::Default: Clone + Ord, V::Default: Clone,

Source§

fn from(map: BTreeMap<K::Default, V::Default>) -> Self

Creates an IObservableMap<K, V> from the given key/value pairs.

Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> Interface for IObservableMap<K, V>

Source§

const IID: GUID

The GUID associated with the interface.
Source§

fn as_raw(&self) -> *mut c_void

Returns the borrowed COM interface pointer.
Source§

fn into_raw(self) -> *mut c_void

Transfers ownership of the COM interface pointer to the caller.
Source§

unsafe fn from_raw(raw: *mut c_void) -> Self

Takes ownership of a COM interface pointer. Read more
Source§

unsafe fn from_raw_borrowed(raw: &*mut c_void) -> Option<&Self>

Borrows a COM interface pointer. Read more
Source§

fn cast<T>(&self) -> Result<T, Error>
where T: Interface,

Queries the object for another interface.
Source§

fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

Returns the generated outer Rust implementation as [&dyn Any]. Read more
Source§

fn is_object<T>(&self) -> bool
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

Returns true if the given COM interface refers to an implementation of T. Read more
Source§

fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

Returns a borrowed reference to the generated outer Rust implementation. Read more
Source§

fn cast_object<T>(&self) -> Result<ComObject<T>, Error>
where T: ComObjectInner, <T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,

Returns an owned reference to the generated outer Rust implementation. Read more
Source§

fn downgrade(&self) -> Result<Weak<Self>, Error>

Attempts to create a Weak reference to this object.
Source§

unsafe fn query(&self, iid: *const GUID, interface: *mut *mut c_void) -> HRESULT

Calls QueryInterface. Read more
Source§

fn to_ref(&self) -> InterfaceRef<'_, Self>

Borrows this interface without changing its reference count.
Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> IntoIterator for IObservableMap<K, V>

Source§

type Item = IKeyValuePair<K, V>

The type of the elements being iterated over.
Source§

type IntoIter = BufferedIterator<<IObservableMap<K, V> as IntoIterator>::Item>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<K: RuntimeType + 'static, V: RuntimeType + 'static> IntoIterator for &IObservableMap<K, V>

Source§

type Item = IKeyValuePair<K, V>

The type of the elements being iterated over.
Source§

type IntoIter = BufferedIterator<<&IObservableMap<K, V> as IntoIterator>::Item>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<K, V> PartialEq for IObservableMap<K, V>
where K: RuntimeType + 'static + PartialEq, V: RuntimeType + 'static + PartialEq,

Source§

fn eq(&self, other: &IObservableMap<K, V>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<K, V> StructuralPartialEq for IObservableMap<K, V>
where K: RuntimeType + 'static + PartialEq, V: RuntimeType + 'static + PartialEq,

Auto Trait Implementations§

§

impl<K, V> !Send for IObservableMap<K, V>

§

impl<K, V> !Sync for IObservableMap<K, V>

§

impl<K, V> Freeze for IObservableMap<K, V>

§

impl<K, V> RefUnwindSafe for IObservableMap<K, V>

§

impl<K, V> Unpin for IObservableMap<K, V>

§

impl<K, V> UnsafeUnpin for IObservableMap<K, V>

§

impl<K, V> UnwindSafe for IObservableMap<K, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.