Struct objc2_foundation::NSMutableDictionary

source ·
#[repr(C)]
pub struct NSMutableDictionary<KeyType: ?Sized = AnyObject, ObjectType: ?Sized = AnyObject> { /* private fields */ }
Available on crate feature NSDictionary only.

Implementations§

source§

impl<K: Message + Eq + Hash + HasStableHash, V: Message> NSMutableDictionary<K, V>

source

pub fn from_vec<Q>(keys: &[&Q], objects: Vec<Retained<V>>) -> Retained<Self>
where Q: Message + NSCopying + CounterpartOrSelf<Immutable = K>,

Available on crate feature NSObject only.
source

pub fn from_id_slice<Q>(keys: &[&Q], objects: &[Retained<V>]) -> Retained<Self>
where Q: Message + NSCopying + CounterpartOrSelf<Immutable = K>, V: IsIdCloneable,

Available on crate feature NSObject only.
source

pub fn from_slice<Q>(keys: &[&Q], objects: &[&V]) -> Retained<Self>
where Q: Message + NSCopying + CounterpartOrSelf<Immutable = K>, V: IsRetainable,

Available on crate feature NSObject only.
source§

impl<K: Message + Eq + Hash + HasStableHash, V: Message> NSMutableDictionary<K, V>

source

pub fn insert_id(&mut self, key: &K, value: Retained<V>) -> Option<Retained<V>>
where K: NSCopying + CounterpartOrSelf<Immutable = K>,

Available on crate feature NSObject only.

Inserts a key-value pair into the dictionary.

If the dictionary did not have this key present, None is returned. If the dictionary did have this key present, the value is updated, and the old value is returned.

§Examples
use objc2_foundation::{NSMutableDictionary, NSObject, ns_string};

let mut dict = NSMutableDictionary::new();
dict.insert_id(ns_string!("one"), NSObject::new());
source

pub fn insert(&mut self, key: &K, value: &V) -> Option<Retained<V>>
where K: NSCopying + CounterpartOrSelf<Immutable = K>, V: IsRetainable,

Available on crate feature NSObject only.

Inserts a key-value pair into the dictionary.

If the dictionary did not have this key present, None is returned. If the dictionary did have this key present, the value is updated, and the old value is returned.

§Examples
use objc2_foundation::{ns_string, NSCopying, NSMutableDictionary};

let mut dict = NSMutableDictionary::new();
dict.insert_id(ns_string!("key"), ns_string!("value").copy());
source

pub fn remove(&mut self, key: &K) -> Option<Retained<V>>
where K: CounterpartOrSelf<Immutable = K>,

Removes a key from the dictionary, returning the value at the key if the key was previously in the dictionary.

§Examples
use objc2_foundation::{ns_string, NSMutableDictionary, NSObject};

let mut dict = NSMutableDictionary::new();
dict.insert_id(ns_string!("one"), NSObject::new());
dict.remove(ns_string!("one"));
assert!(dict.is_empty());
source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

Methods declared on superclass NSDictionary

NSDictionaryCreation

source

pub unsafe fn dictionary() -> Retained<Self>

source

pub unsafe fn dictionaryWithObject_forKey( object: &ObjectType, key: &ProtocolObject<dyn NSCopying> ) -> Retained<Self>

Available on crate feature NSObject only.
source

pub unsafe fn dictionaryWithObjects_forKeys_count( objects: *mut NonNull<ObjectType>, keys: *mut NonNull<ProtocolObject<dyn NSCopying>>, cnt: NSUInteger ) -> Retained<Self>

Available on crate feature NSObject only.
source

pub unsafe fn dictionaryWithDictionary( dict: &NSDictionary<KeyType, ObjectType> ) -> Retained<Self>

source

pub unsafe fn dictionaryWithObjects_forKeys( objects: &NSArray<ObjectType>, keys: &NSArray<ProtocolObject<dyn NSCopying>> ) -> Retained<Self>

Available on crate features NSArray and NSObject only.
source

pub unsafe fn initWithDictionary( this: Allocated<Self>, other_dictionary: &NSDictionary<KeyType, ObjectType> ) -> Retained<Self>

source

pub unsafe fn initWithDictionary_copyItems( this: Allocated<Self>, other_dictionary: &NSDictionary<KeyType, ObjectType>, flag: bool ) -> Retained<Self>

source

pub unsafe fn initWithObjects_forKeys( this: Allocated<Self>, objects: &NSArray<ObjectType>, keys: &NSArray<ProtocolObject<dyn NSCopying>> ) -> Retained<Self>

Available on crate features NSArray and NSObject only.
source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

source

pub fn removeObjectForKey(&mut self, a_key: &KeyType)

source

pub unsafe fn setObject_forKey( &mut self, an_object: &ObjectType, a_key: &ProtocolObject<dyn NSCopying> )

Available on crate feature NSObject only.
source

pub fn init(this: Allocated<Self>) -> Retained<Self>

source

pub unsafe fn initWithCapacity( this: Allocated<Self>, num_items: NSUInteger ) -> Retained<Self>

source

pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Option<Retained<Self>>

Available on crate feature NSCoder only.
source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

Methods declared on superclass NSDictionary

source

pub unsafe fn initWithObjects_forKeys_count( this: Allocated<Self>, objects: *mut NonNull<ObjectType>, keys: *mut NonNull<ProtocolObject<dyn NSCopying>>, cnt: NSUInteger ) -> Retained<Self>

Available on crate feature NSObject only.
source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

Methods declared on superclass NSObject

source

pub fn new() -> Retained<Self>

source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

NSExtendedMutableDictionary

source

pub unsafe fn addEntriesFromDictionary( &mut self, other_dictionary: &NSDictionary<KeyType, ObjectType> )

source

pub fn removeAllObjects(&mut self)

source

pub unsafe fn removeObjectsForKeys(&mut self, key_array: &NSArray<KeyType>)

Available on crate feature NSArray only.
source

pub unsafe fn setDictionary( &mut self, other_dictionary: &NSDictionary<KeyType, ObjectType> )

source

pub unsafe fn setObject_forKeyedSubscript( &mut self, obj: Option<&ObjectType>, key: &ProtocolObject<dyn NSCopying> )

Available on crate feature NSObject only.
source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

NSMutableDictionaryCreation

source

pub unsafe fn dictionaryWithCapacity(num_items: NSUInteger) -> Retained<Self>

source

pub unsafe fn dictionaryWithContentsOfFile( path: &NSString ) -> Option<Retained<NSMutableDictionary<KeyType, ObjectType>>>

Available on crate feature NSString only.
source

pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL ) -> Option<Retained<NSMutableDictionary<KeyType, ObjectType>>>

Available on crate feature NSURL only.
source

pub unsafe fn initWithContentsOfFile( this: Allocated<Self>, path: &NSString ) -> Option<Retained<NSMutableDictionary<KeyType, ObjectType>>>

Available on crate feature NSString only.
source

pub unsafe fn initWithContentsOfURL( this: Allocated<Self>, url: &NSURL ) -> Option<Retained<NSMutableDictionary<KeyType, ObjectType>>>

Available on crate feature NSURL only.
source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

NSSharedKeySetDictionary

source

pub unsafe fn dictionaryWithSharedKeySet( keyset: &AnyObject ) -> Retained<NSMutableDictionary<KeyType, ObjectType>>

source§

impl<KeyType: Message, ObjectType: Message> NSMutableDictionary<KeyType, ObjectType>

NSKeyValueCoding

source

pub unsafe fn setValue_forKey( &mut self, value: Option<&ObjectType>, key: &NSString )

Available on crate features NSKeyValueCoding and NSString only.

Methods from Deref<Target = NSDictionary<KeyType, ObjectType>>§

source

pub fn get(&self, key: &K) -> Option<&V>

source

pub fn get_retained(&self, key: &K) -> Option<Retained<V>>
where V: IsIdCloneable,

source

pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
where V: IsMutable,

Returns a mutable reference to the value corresponding to the key.

§Examples
 use objc2_foundation::{ns_string, NSMutableDictionary, NSMutableString, NSString};

 let mut dict = NSMutableDictionary::new();
 dict.insert_id(ns_string!("one"), NSMutableString::new());
 println!("{:?}", dict.get_mut(ns_string!("one")));
source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn keys_vec(&self) -> Vec<&K>

source

pub fn values_vec(&self) -> Vec<&V>

source

pub fn values_vec_mut(&mut self) -> Vec<&mut V>
where V: IsMutable,

Returns a vector of mutable references to the values in the dictionary.

§Examples
use objc2_foundation::{ns_string, NSMutableDictionary, NSMutableString, NSString};

let mut dict = NSMutableDictionary::new();
dict.insert_id(ns_string!("one"), NSMutableString::from_str("two"));
for val in dict.values_mut() {
    println!("{:?}", val);
}
source

pub fn to_vecs(&self) -> (Vec<&K>, Vec<&V>)

source

pub fn to_array(&self) -> Retained<NSArray<V>>
where V: IsIdCloneable,

Available on crate feature NSArray only.

Returns an NSArray containing the dictionary’s values.

§Examples
use objc2_foundation::{ns_string, NSMutableDictionary, NSObject, NSString};

let mut dict = NSMutableDictionary::new();
dict.insert_id(ns_string!("one"), NSObject::new());
let array = dict.to_array();
assert_eq!(array.len(), 1);
source

pub fn keys(&self) -> Keys<'_, K, V>

Available on crate feature NSEnumerator only.
source

pub fn keys_retained(&self) -> KeysRetained<'_, K, V>
where K: IsIdCloneable,

Available on crate feature NSEnumerator only.
source

pub fn values(&self) -> Values<'_, K, V>

Available on crate feature NSEnumerator only.
source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>
where V: IsMutable,

Available on crate feature NSEnumerator only.
source

pub fn values_retained(&self) -> ValuesRetained<'_, K, V>
where V: IsIdCloneable,

Available on crate feature NSEnumerator only.
source

pub fn count(&self) -> NSUInteger

source

pub unsafe fn objectForKey( &self, a_key: &KeyType ) -> Option<Retained<ObjectType>>

source

pub unsafe fn keyEnumerator(&self) -> Retained<NSEnumerator<KeyType>>

Available on crate feature NSEnumerator only.
source

pub unsafe fn allKeys(&self) -> Retained<NSArray<KeyType>>

Available on crate feature NSArray only.
source

pub unsafe fn allKeysForObject( &self, an_object: &ObjectType ) -> Retained<NSArray<KeyType>>

Available on crate feature NSArray only.
source

pub unsafe fn allValues(&self) -> Retained<NSArray<ObjectType>>

Available on crate feature NSArray only.
source

pub unsafe fn description(&self) -> Retained<NSString>

Available on crate feature NSString only.
source

pub unsafe fn descriptionInStringsFileFormat(&self) -> Retained<NSString>

Available on crate feature NSString only.
source

pub unsafe fn descriptionWithLocale( &self, locale: Option<&AnyObject> ) -> Retained<NSString>

Available on crate feature NSString only.
source

pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&AnyObject>, level: NSUInteger ) -> Retained<NSString>

Available on crate feature NSString only.
source

pub unsafe fn isEqualToDictionary( &self, other_dictionary: &NSDictionary<KeyType, ObjectType> ) -> bool

source

pub unsafe fn objectEnumerator(&self) -> Retained<NSEnumerator<ObjectType>>

Available on crate feature NSEnumerator only.
source

pub unsafe fn objectsForKeys_notFoundMarker( &self, keys: &NSArray<KeyType>, marker: &ObjectType ) -> Retained<NSArray<ObjectType>>

Available on crate feature NSArray only.
source

pub unsafe fn writeToURL_error( &self, url: &NSURL ) -> Result<(), Retained<NSError>>

Available on crate features NSError and NSURL only.
source

pub unsafe fn keysSortedByValueUsingSelector( &self, comparator: Sel ) -> Retained<NSArray<KeyType>>

Available on crate feature NSArray only.
source

pub unsafe fn getObjects_andKeys_count( &self, objects: *mut NonNull<ObjectType>, keys: *mut NonNull<KeyType>, count: NSUInteger )

source

pub unsafe fn objectForKeyedSubscript( &self, key: &KeyType ) -> Option<Retained<ObjectType>>

source

pub unsafe fn enumerateKeysAndObjectsUsingBlock( &self, block: &Block<dyn Fn(NonNull<KeyType>, NonNull<ObjectType>, NonNull<Bool>) + '_> )

Available on crate feature block2 only.
source

pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: &Block<dyn Fn(NonNull<KeyType>, NonNull<ObjectType>, NonNull<Bool>) + '_> )

Available on crate features NSObjCRuntime and block2 only.
source

pub unsafe fn keysSortedByValueUsingComparator( &self, cmptr: NSComparator ) -> Retained<NSArray<KeyType>>

Available on crate features NSArray and NSObjCRuntime and block2 only.
source

pub unsafe fn keysSortedByValueWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator ) -> Retained<NSArray<KeyType>>

Available on crate features NSArray and NSObjCRuntime and block2 only.
source

pub unsafe fn keysOfEntriesPassingTest( &self, predicate: &Block<dyn Fn(NonNull<KeyType>, NonNull<ObjectType>, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSSet<KeyType>>

Available on crate features NSSet and block2 only.
source

pub unsafe fn keysOfEntriesWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: &Block<dyn Fn(NonNull<KeyType>, NonNull<ObjectType>, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSSet<KeyType>>

Available on crate features NSObjCRuntime and NSSet and block2 only.
source

pub unsafe fn getObjects_andKeys( &self, objects: *mut NonNull<ObjectType>, keys: *mut NonNull<KeyType> )

👎Deprecated: Use -getObjects:andKeys:count: instead
source

pub unsafe fn writeToFile_atomically( &self, path: &NSString, use_auxiliary_file: bool ) -> bool

👎Deprecated
Available on crate feature NSString only.
source

pub unsafe fn writeToURL_atomically( &self, url: &NSURL, atomically: bool ) -> bool

👎Deprecated
Available on crate feature NSURL only.
source

pub unsafe fn fileSize(&self) -> c_ulonglong

Available on crate feature NSFileManager only.
source

pub unsafe fn fileModificationDate(&self) -> Option<Retained<NSDate>>

Available on crate features NSFileManager and NSDate only.
source

pub unsafe fn fileType(&self) -> Option<Retained<NSString>>

Available on crate features NSFileManager and NSString only.
source

pub unsafe fn filePosixPermissions(&self) -> NSUInteger

Available on crate feature NSFileManager only.
source

pub unsafe fn fileOwnerAccountName(&self) -> Option<Retained<NSString>>

Available on crate features NSFileManager and NSString only.
source

pub unsafe fn fileGroupOwnerAccountName(&self) -> Option<Retained<NSString>>

Available on crate features NSFileManager and NSString only.
source

pub unsafe fn fileSystemNumber(&self) -> NSInteger

Available on crate feature NSFileManager only.
source

pub unsafe fn fileSystemFileNumber(&self) -> NSUInteger

Available on crate feature NSFileManager only.
source

pub unsafe fn fileExtensionHidden(&self) -> bool

Available on crate feature NSFileManager only.
source

pub unsafe fn fileHFSCreatorCode(&self) -> OSType

Available on crate feature NSFileManager only.
source

pub unsafe fn fileHFSTypeCode(&self) -> OSType

Available on crate feature NSFileManager only.
source

pub unsafe fn fileIsImmutable(&self) -> bool

Available on crate feature NSFileManager only.
source

pub unsafe fn fileIsAppendOnly(&self) -> bool

Available on crate feature NSFileManager only.
source

pub unsafe fn fileCreationDate(&self) -> Option<Retained<NSDate>>

Available on crate features NSFileManager and NSDate only.
source

pub unsafe fn fileOwnerAccountID(&self) -> Option<Retained<NSNumber>>

Available on crate features NSFileManager and NSValue only.
source

pub unsafe fn fileGroupOwnerAccountID(&self) -> Option<Retained<NSNumber>>

Available on crate features NSFileManager and NSValue only.
source

pub unsafe fn valueForKey(&self, key: &NSString) -> Option<Retained<ObjectType>>

Available on crate features NSKeyValueCoding and NSString only.

Methods from Deref<Target = NSObject>§

source

pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !

Handle messages the object doesn’t recognize.

See Apple’s documentation for details.

Methods from Deref<Target = AnyObject>§

source

pub fn class(&self) -> &'static AnyClass

Dynamically find the class of this object.

§Example

Check that an instance of NSObject has the precise class NSObject.

use objc2::ClassType;
use objc2::runtime::NSObject;

let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &T
where T: Encode,

👎Deprecated: this is difficult to use correctly, use Ivar::load instead.

Use Ivar::load instead.

§Safety

The object must have an instance variable with the given name, and it must be of type T.

See Ivar::load_ptr for details surrounding this.

source

pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T
where T: Encode,

👎Deprecated: this is difficult to use correctly, use Ivar::load_mut instead.

Use Ivar::load_mut instead.

§Safety

The object must have an instance variable with the given name, and it must be of type T.

See Ivar::load_ptr for details surrounding this.

Trait Implementations§

source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsMut<AnyObject> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_mut(&mut self) -> &mut AnyObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsMut<NSDictionary<KeyType, ObjectType>> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_mut(&mut self) -> &mut NSDictionary<KeyType, ObjectType>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsMut<NSMutableDictionary<KeyType, ObjectType>> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsMut<NSObject> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_mut(&mut self) -> &mut NSObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsRef<AnyObject> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_ref(&self) -> &AnyObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsRef<NSDictionary<KeyType, ObjectType>> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_ref(&self) -> &NSDictionary<KeyType, ObjectType>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsRef<NSMutableDictionary<KeyType, ObjectType>> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> AsRef<NSObject> for NSMutableDictionary<KeyType, ObjectType>

source§

fn as_ref(&self) -> &NSObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> Borrow<AnyObject> for NSMutableDictionary<KeyType, ObjectType>

source§

fn borrow(&self) -> &AnyObject

Immutably borrows from an owned value. Read more
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> Borrow<NSDictionary<KeyType, ObjectType>> for NSMutableDictionary<KeyType, ObjectType>

source§

fn borrow(&self) -> &NSDictionary<KeyType, ObjectType>

Immutably borrows from an owned value. Read more
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> Borrow<NSObject> for NSMutableDictionary<KeyType, ObjectType>

source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> BorrowMut<AnyObject> for NSMutableDictionary<KeyType, ObjectType>

source§

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

Mutably borrows from an owned value. Read more
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> BorrowMut<NSDictionary<KeyType, ObjectType>> for NSMutableDictionary<KeyType, ObjectType>

source§

fn borrow_mut(&mut self) -> &mut NSDictionary<KeyType, ObjectType>

Mutably borrows from an owned value. Read more
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> BorrowMut<NSObject> for NSMutableDictionary<KeyType, ObjectType>

source§

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

Mutably borrows from an owned value. Read more
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> ClassType for NSMutableDictionary<KeyType, ObjectType>

§

type Super = NSDictionary<KeyType, ObjectType>

The superclass of this class. Read more
§

type Mutability = MutableWithImmutableSuperclass<NSDictionary<KeyType, ObjectType>>

Whether the type is mutable or immutable. Read more
source§

const NAME: &'static str = "NSMutableDictionary"

The name of the Objective-C class that this type represents. Read more
source§

fn class() -> &'static AnyClass

Get a reference to the Objective-C class that this type represents. Read more
source§

fn as_super(&self) -> &Self::Super

Get an immutable reference to the superclass.
source§

fn as_super_mut(&mut self) -> &mut Self::Super

Get a mutable reference to the superclass.
source§

fn alloc() -> Allocated<Self>

Allocate a new instance of the class. Read more
source§

impl<K: Debug + Message, V: Debug + Message> Debug for NSMutableDictionary<K, V>

source§

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

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

impl<KeyType: Message, ObjectType: Message> DefaultRetained for NSMutableDictionary<KeyType, ObjectType>

source§

fn default_id() -> Retained<Self>

The default Retained for a type. Read more
source§

fn default_retained() -> Retained<Self>

The default Retained for a type. Read more
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> Deref for NSMutableDictionary<KeyType, ObjectType>

§

type Target = NSDictionary<KeyType, ObjectType>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> DerefMut for NSMutableDictionary<KeyType, ObjectType>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<KeyType: Hash + ?Sized, ObjectType: Hash + ?Sized> Hash for NSMutableDictionary<KeyType, ObjectType>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a, K: Message + Eq + Hash, V: Message> Index<&'a K> for NSMutableDictionary<K, V>

§

type Output = V

The returned type after indexing.
source§

fn index<'s>(&'s self, index: &'a K) -> &'s V

Performs the indexing (container[index]) operation. Read more
source§

impl<'a, K: Message + Eq + Hash, V: Message + IsMutable> IndexMut<&'a K> for NSMutableDictionary<K, V>

source§

fn index_mut<'s>(&'s mut self, index: &'a K) -> &'s mut V

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<KeyType: PartialEq + ?Sized, ObjectType: PartialEq + ?Sized> PartialEq for NSMutableDictionary<KeyType, ObjectType>

source§

fn eq(&self, other: &NSMutableDictionary<KeyType, ObjectType>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> RefEncode for NSMutableDictionary<KeyType, ObjectType>

source§

const ENCODING_REF: Encoding = <NSDictionary<KeyType, ObjectType> as ::objc2::RefEncode>::ENCODING_REF

The Objective-C type-encoding for a reference of this type. Read more
source§

impl<KeyType: Eq + ?Sized, ObjectType: Eq + ?Sized> Eq for NSMutableDictionary<KeyType, ObjectType>

source§

impl<KeyType: ?Sized + Message, ObjectType: ?Sized + Message> Message for NSMutableDictionary<KeyType, ObjectType>

source§

impl<KeyType: ?Sized + NSCoding, ObjectType: ?Sized + NSCoding> NSCoding for NSMutableDictionary<KeyType, ObjectType>

Available on crate feature NSObject only.
source§

impl<KeyType: ?Sized + IsIdCloneable, ObjectType: ?Sized + IsIdCloneable> NSCopying for NSMutableDictionary<KeyType, ObjectType>

Available on crate feature NSObject only.
source§

impl<KeyType: ?Sized, ObjectType: ?Sized> NSFastEnumeration for NSMutableDictionary<KeyType, ObjectType>

Available on crate feature NSEnumerator only.
source§

impl<KeyType: ?Sized + IsIdCloneable, ObjectType: ?Sized + IsIdCloneable> NSMutableCopying for NSMutableDictionary<KeyType, ObjectType>

Available on crate feature NSObject only.
source§

impl<KeyType: ?Sized, ObjectType: ?Sized> NSObjectProtocol for NSMutableDictionary<KeyType, ObjectType>

source§

impl<KeyType: ?Sized + NSSecureCoding, ObjectType: ?Sized + NSSecureCoding> NSSecureCoding for NSMutableDictionary<KeyType, ObjectType>

Available on crate feature NSObject only.
source§

impl<KeyType: ?Sized, ObjectType: ?Sized> StructuralPartialEq for NSMutableDictionary<KeyType, ObjectType>

Auto Trait Implementations§

§

impl<KeyType = AnyObject, ObjectType = AnyObject> !Freeze for NSMutableDictionary<KeyType, ObjectType>

§

impl<KeyType, ObjectType> RefUnwindSafe for NSMutableDictionary<KeyType, ObjectType>
where KeyType: RefUnwindSafe + ?Sized, ObjectType: RefUnwindSafe + ?Sized,

§

impl<KeyType, ObjectType> Send for NSMutableDictionary<KeyType, ObjectType>
where KeyType: ClassType + Send + ?Sized, ObjectType: ClassType + Send + ?Sized, <KeyType as ClassType>::Mutability: SendSyncHelper<KeyType>, <ObjectType as ClassType>::Mutability: SendSyncHelper<ObjectType>, <<KeyType as ClassType>::Mutability as SendSyncHelper<KeyType>>::EquivalentType: Send, <<ObjectType as ClassType>::Mutability as SendSyncHelper<ObjectType>>::EquivalentType: Send,

§

impl<KeyType, ObjectType> Sync for NSMutableDictionary<KeyType, ObjectType>
where KeyType: ClassType + Sync + ?Sized, ObjectType: ClassType + Sync + ?Sized, <KeyType as ClassType>::Mutability: SendSyncHelper<KeyType>, <ObjectType as ClassType>::Mutability: SendSyncHelper<ObjectType>, <<KeyType as ClassType>::Mutability as SendSyncHelper<KeyType>>::EquivalentType: Sync, <<ObjectType as ClassType>::Mutability as SendSyncHelper<ObjectType>>::EquivalentType: Sync,

§

impl<KeyType = AnyObject, ObjectType = AnyObject> !Unpin for NSMutableDictionary<KeyType, ObjectType>

§

impl<KeyType, ObjectType> UnwindSafe for NSMutableDictionary<KeyType, ObjectType>
where KeyType: RefUnwindSafe + UnwindSafe + ?Sized, ObjectType: RefUnwindSafe + UnwindSafe + ?Sized,

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

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