pub trait INSMutableDictionary<K, V>: INSDictionary<K, V> {
// Provided methods
fn tm_dictionary_with_capacity(capacity: UInt) -> Self
where Self: Sized + FromId { ... }
fn im_set_object_for_key(&mut self, key: K, value: V)
where K: PNSObject,
V: PNSObject { ... }
fn im_set_object_forkeyed_superscript(&mut self, key: K, value: V)
where K: Into<id>,
V: Into<id> { ... }
fn im_set_value_for_key(&mut self, key: K, value: V)
where K: Into<NSString>,
V: Into<id> { ... }
fn im_add_entries_from_dictionary(&mut self, dictionary: NSDictionary<K, V>) { ... }
fn im_set_dictionary(&mut self, dictionary: NSDictionary<K, V>) { ... }
fn im_remove_object_for_key(&mut self, key: K)
where K: Into<id> { ... }
fn im_remove_all_objects(&mut self) { ... }
fn im_remove_objects_for_keys(&mut self, keys: NSArray<K>)
where K: PNSObject { ... }
}
Expand description
A dynamic collection of objects associated with unique keys.
Provided Methods§
Sourcefn tm_dictionary_with_capacity(capacity: UInt) -> Self
fn tm_dictionary_with_capacity(capacity: UInt) -> Self
Creates and returns a mutable dictionary, initially giving it enough allocated memory to hold a given number of entries.
Sourcefn im_set_object_for_key(&mut self, key: K, value: V)
fn im_set_object_for_key(&mut self, key: K, value: V)
Adds a given key-value pair to the dictionary.
Sourcefn im_set_object_forkeyed_superscript(&mut self, key: K, value: V)
fn im_set_object_forkeyed_superscript(&mut self, key: K, value: V)
Adds a given key-value pair to the dictionary.
Sourcefn im_set_value_for_key(&mut self, key: K, value: V)
fn im_set_value_for_key(&mut self, key: K, value: V)
Adds a given key-value pair to the dictionary.
Sourcefn im_add_entries_from_dictionary(&mut self, dictionary: NSDictionary<K, V>)
fn im_add_entries_from_dictionary(&mut self, dictionary: NSDictionary<K, V>)
Adds to the receiving dictionary the entries from another dictionary.
Sourcefn im_set_dictionary(&mut self, dictionary: NSDictionary<K, V>)
fn im_set_dictionary(&mut self, dictionary: NSDictionary<K, V>)
Sets the contents of the receiving dictionary to entries in a given dictionary.
Sourcefn im_remove_object_for_key(&mut self, key: K)
fn im_remove_object_for_key(&mut self, key: K)
Removes a given key and its associated value from the dictionary.
Sourcefn im_remove_all_objects(&mut self)
fn im_remove_all_objects(&mut self)
Empties the dictionary of its entries.
Sourcefn im_remove_objects_for_keys(&mut self, keys: NSArray<K>)where
K: PNSObject,
fn im_remove_objects_for_keys(&mut self, keys: NSArray<K>)where
K: PNSObject,
Removes from the dictionary entries specified by elements in a given array.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.