Struct core_graphics::display::CFDictionary
source · pub struct CFDictionary<K = *const c_void, V = *const c_void>(/* private fields */);
Implementations§
source§impl<K, V> CFDictionary<K, V>
impl<K, V> CFDictionary<K, V>
pub fn from_CFType_pairs(pairs: &[(K, V)]) -> CFDictionary<K, V>
pub fn to_untyped(&self) -> CFDictionary
sourcepub unsafe fn to_mutable(&self) -> CFMutableDictionary<K, V>
pub unsafe fn to_mutable(&self) -> CFMutableDictionary<K, V>
Returns a CFMutableDictionary
pointing to the same underlying dictionary as this immutable one.
This should only be used when the underlying dictionary is mutable.
sourcepub fn into_untyped(self) -> CFDictionary
pub fn into_untyped(self) -> CFDictionary
Returns the same dictionary, but with the types reset to void pointers.
Equal to to_untyped
, but is faster since it does not increment the retain count.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains_key(&self, key: &K) -> boolwhere
K: ToVoid<K>,
pub fn find<T>(&self, key: T) -> Option<ItemRef<'_, V>>
sourcepub fn get<T>(&self, key: T) -> ItemRef<'_, V>
pub fn get<T>(&self, key: T) -> ItemRef<'_, V>
§Panics
Panics if the key is not present in the dictionary. Use find
to get an Option
instead
of panicking.
pub fn get_keys_and_values(&self) -> (Vec<*const c_void>, Vec<*const c_void>)
Trait Implementations§
source§impl CFPropertyListSubClass for CFDictionary
impl CFPropertyListSubClass for CFDictionary
source§fn to_CFPropertyList(&self) -> CFPropertyList
fn to_CFPropertyList(&self) -> CFPropertyList
Create an instance of the superclass type
CFPropertyList
for this instance.source§fn into_CFPropertyList(self) -> CFPropertyListwhere
Self: Sized,
fn into_CFPropertyList(self) -> CFPropertyListwhere
Self: Sized,
Equal to
to_CFPropertyList
, but consumes self and avoids changing the reference count.source§impl Clone for CFDictionary
impl Clone for CFDictionary
source§fn clone(&self) -> CFDictionary
fn clone(&self) -> CFDictionary
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<K, V> Debug for CFDictionary<K, V>
impl<K, V> Debug for CFDictionary<K, V>
source§impl<K, V> Drop for CFDictionary<K, V>
impl<K, V> Drop for CFDictionary<K, V>
source§impl PartialEq for CFDictionary
impl PartialEq for CFDictionary
source§impl<K, V> TCFType for CFDictionary<K, V>
impl<K, V> TCFType for CFDictionary<K, V>
§type Ref = *const __CFDictionary
type Ref = *const __CFDictionary
The reference type wrapped inside this type.
source§fn as_concrete_TypeRef(&self) -> *const __CFDictionary
fn as_concrete_TypeRef(&self) -> *const __CFDictionary
Returns the object as its concrete
TypeRef
.source§unsafe fn wrap_under_get_rule(
reference: *const __CFDictionary,
) -> CFDictionary<K, V>
unsafe fn wrap_under_get_rule( reference: *const __CFDictionary, ) -> CFDictionary<K, V>
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.source§fn as_CFTypeRef(&self) -> *const c_void
fn as_CFTypeRef(&self) -> *const c_void
Returns the object as a raw
CFTypeRef
. The reference count is not adjusted.source§unsafe fn wrap_under_create_rule(
reference: *const __CFDictionary,
) -> CFDictionary<K, V>
unsafe fn wrap_under_create_rule( reference: *const __CFDictionary, ) -> CFDictionary<K, V>
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
Returns the object as a wrapped
CFType
. The reference count is incremented by one.source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere
Self: Sized,
Returns the object as a wrapped
CFType
. Consumes self and avoids changing the reference
count.source§fn retain_count(&self) -> isize
fn retain_count(&self) -> isize
Returns the reference count of the object. It is unwise to do anything other than test
whether the return value of this method is greater than zero.
source§fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
Returns
true
if this value is an instance of another type.source§impl<'a> ToVoid<CFDictionary> for &'a CFDictionary
impl<'a> ToVoid<CFDictionary> for &'a CFDictionary
source§impl ToVoid<CFDictionary> for CFDictionary
impl ToVoid<CFDictionary> for CFDictionary
impl ConcreteCFType for CFDictionary
impl Eq for CFDictionary
Auto Trait Implementations§
impl<K, V> Freeze for CFDictionary<K, V>
impl<K, V> RefUnwindSafe for CFDictionary<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K = *const c_void, V = *const c_void> !Send for CFDictionary<K, V>
impl<K = *const c_void, V = *const c_void> !Sync for CFDictionary<K, V>
impl<K, V> Unpin for CFDictionary<K, V>
impl<K, V> UnwindSafe for CFDictionary<K, V>where
K: UnwindSafe,
V: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)