Skip to main content

INSDictionary

Trait INSDictionary 

Source
pub trait INSDictionary<K, V>: PNSObject {
Show 15 methods // Provided methods fn m_dictionary() -> Self where Self: Sized + FromId { ... } fn m_init() -> Self where Self: Sized + FromId { ... } fn m_dictionary_with_dictionary<D>(dictionary: D) -> Self where Self: Sized + FromId, D: INSDictionary<K, V> { ... } fn m_init_with_dictionary(&mut self, dictionary: NSDictionary<K, V>) { ... } fn m_init_with_dictionary_copy_items( &mut self, dictionary: NSDictionary<K, V>, flag: bool, ) { ... } fn p_count(&self) -> UInt { ... } fn m_is_equal_to_dictionary<D>(&self, other: D) -> bool where D: INSDictionary<K, V> { ... } fn p_all_keys(&self) -> NSArray<K> { ... } fn m_all_keys_for_object(&self, object: &V) -> NSArray<K> { ... } fn p_all_values(&self) -> NSArray<V> { ... } fn m_value_for_key(&self, key: &K) -> Option<V> where V: FromId { ... } fn m_get_objects_and_keys_count( &self, objects: *mut V, keys: *mut K, count: UInt, ) { ... } fn m_objects_for_keys_not_found_marker( &self, keys: &NSArray<K>, value: &V, ) -> NSArray<V> { ... } fn m_object_for_key(&self, key: K) -> Option<V> where V: FromId { ... } fn m_object_for_keyed_subscript(&self, key: &K) -> V where V: FromId { ... }
}
Expand description

A static collection of objects associated with unique keys.

Provided Methods§

Source

fn m_dictionary() -> Self
where Self: Sized + FromId,

Creates an empty dictionary.

Source

fn m_init() -> Self
where Self: Sized + FromId,

Initializes a newly allocated dictionary.

Source

fn m_dictionary_with_dictionary<D>(dictionary: D) -> Self
where Self: Sized + FromId, D: INSDictionary<K, V>,

Creates a dictionary containing the keys and values from another given dictionary.

Source

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

Creates and initialize a dictionary

Source

fn m_init_with_dictionary_copy_items( &mut self, dictionary: NSDictionary<K, V>, flag: bool, )

Initializes a newly allocated dictionary using the objects contained in another given dictionary.

Source

fn p_count(&self) -> UInt

The number of entries in the dictionary.

Source

fn m_is_equal_to_dictionary<D>(&self, other: D) -> bool
where D: INSDictionary<K, V>,

Returns a Boolean value that indicates whether the contents of the receiving dictionary are equal to the contents of another given dictionary.

Source

fn p_all_keys(&self) -> NSArray<K>

A new array containing the dictionary’s keys, or an empty array if the dictionary has no entries.

Source

fn m_all_keys_for_object(&self, object: &V) -> NSArray<K>

Returns a new array containing the keys corresponding to all occurrences of a given object in the dictionary.

Source

fn p_all_values(&self) -> NSArray<V>

A new array containing the dictionary’s values, or an empty array if the dictionary has no entries.

Source

fn m_value_for_key(&self, key: &K) -> Option<V>
where V: FromId,

Returns the value associated with a given key.

Source

fn m_get_objects_and_keys_count( &self, objects: *mut V, keys: *mut K, count: UInt, )

Returns by reference C arrays of the keys and values in the dictionary.

Source

fn m_objects_for_keys_not_found_marker( &self, keys: &NSArray<K>, value: &V, ) -> NSArray<V>

Returns as a static array the set of objects from the dictionary that corresponds to the specified keys.

Source

fn m_object_for_key(&self, key: K) -> Option<V>
where V: FromId,

Returns the value associated with a given key.

Source

fn m_object_for_keyed_subscript(&self, key: &K) -> V
where V: FromId,

Returns the value associated with a given key.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<K, V> INSDictionary<K, V> for NSDictionary<K, V>

Source§

impl<K, V> INSDictionary<K, V> for NSMutableDictionary<K, V>