Trait INSMutableDictionary

Source
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§

Source

fn tm_dictionary_with_capacity(capacity: UInt) -> Self
where Self: Sized + FromId,

Creates and returns a mutable dictionary, initially giving it enough allocated memory to hold a given number of entries.

Source

fn im_set_object_for_key(&mut self, key: K, value: V)
where K: PNSObject, V: PNSObject,

Adds a given key-value pair to the dictionary.

Source

fn im_set_object_forkeyed_superscript(&mut self, key: K, value: V)
where K: Into<id>, V: Into<id>,

Adds a given key-value pair to the dictionary.

Source

fn im_set_value_for_key(&mut self, key: K, value: V)
where K: Into<NSString>, V: Into<id>,

Adds a given key-value pair to the dictionary.

Source

fn im_add_entries_from_dictionary(&mut self, dictionary: NSDictionary<K, V>)

Adds to the receiving dictionary the entries from another dictionary.

Source

fn im_set_dictionary(&mut self, dictionary: NSDictionary<K, V>)

Sets the contents of the receiving dictionary to entries in a given dictionary.

Source

fn im_remove_object_for_key(&mut self, key: K)
where K: Into<id>,

Removes a given key and its associated value from the dictionary.

Source

fn im_remove_all_objects(&mut self)

Empties the dictionary of its entries.

Source

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.

Implementors§