#[repr(C)]pub struct CFMutableBag<T: ?Sized = Opaque> { /* private fields */ }
Available on crate feature
CFBag
only.Expand description
Implementations§
Source§impl CFMutableBag
impl CFMutableBag
pub unsafe fn new( allocator: Option<&CFAllocator>, capacity: CFIndex, call_backs: *const CFBagCallBacks, ) -> Option<CFRetained<CFMutableBag>>
pub unsafe fn new_copy( allocator: Option<&CFAllocator>, capacity: CFIndex, the_bag: Option<&CFBag>, ) -> Option<CFRetained<CFMutableBag>>
Source§impl CFMutableBag
impl CFMutableBag
pub unsafe fn add_value(the_bag: Option<&CFMutableBag>, value: *const c_void)
pub unsafe fn replace_value( the_bag: Option<&CFMutableBag>, value: *const c_void, )
pub unsafe fn set_value(the_bag: Option<&CFMutableBag>, value: *const c_void)
pub unsafe fn remove_value(the_bag: Option<&CFMutableBag>, value: *const c_void)
pub unsafe fn remove_all_values(the_bag: Option<&CFMutableBag>)
Methods from Deref<Target = CFBag<T>>§
pub unsafe fn count(self: &CFBag) -> CFIndex
pub unsafe fn count_of_value(self: &CFBag, value: *const c_void) -> CFIndex
pub unsafe fn contains_value(self: &CFBag, value: *const c_void) -> bool
pub unsafe fn value(self: &CFBag, value: *const c_void) -> *const c_void
pub unsafe fn value_if_present( self: &CFBag, candidate: *const c_void, value: *mut *const c_void, ) -> bool
pub unsafe fn values(self: &CFBag, values: *mut *const c_void)
pub unsafe fn apply_function( self: &CFBag, applier: CFBagApplierFunction, context: *mut c_void, )
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
pub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl<T: ?Sized> AsRef<CFMutableBag<T>> for CFMutableBag<T>
impl<T: ?Sized> AsRef<CFMutableBag<T>> for CFMutableBag<T>
Source§impl<T: ?Sized> Debug for CFMutableBag<T>
impl<T: ?Sized> Debug for CFMutableBag<T>
Source§impl<T: ?Sized> Deref for CFMutableBag<T>
impl<T: ?Sized> Deref for CFMutableBag<T>
Source§impl<T: ?Sized> Hash for CFMutableBag<T>
impl<T: ?Sized> Hash for CFMutableBag<T>
Source§impl<T: ?Sized> Message for CFMutableBag<T>
impl<T: ?Sized> Message for CFMutableBag<T>
Source§impl<T: ?Sized> PartialEq for CFMutableBag<T>
impl<T: ?Sized> PartialEq for CFMutableBag<T>
Source§impl<T: ?Sized> RefEncode for CFMutableBag<T>
impl<T: ?Sized> RefEncode for CFMutableBag<T>
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Source§impl<T: ?Sized> Type for CFMutableBag<T>
impl<T: ?Sized> Type for CFMutableBag<T>
Source§fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation
crate. Read moreimpl<T: ?Sized> Eq for CFMutableBag<T>
Auto Trait Implementations§
impl<T = Opaque> !Freeze for CFMutableBag<T>
impl<T = Opaque> !RefUnwindSafe for CFMutableBag<T>
impl<T = Opaque> !Send for CFMutableBag<T>
impl<T = Opaque> !Sync for CFMutableBag<T>
impl<T = Opaque> !Unpin for CFMutableBag<T>
impl<T = Opaque> !UnwindSafe for CFMutableBag<T>
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