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§
Sourcefn m_dictionary() -> Self
fn m_dictionary() -> Self
Creates an empty dictionary.
Sourcefn m_dictionary_with_dictionary<D>(dictionary: D) -> Self
fn m_dictionary_with_dictionary<D>(dictionary: D) -> Self
Creates a dictionary containing the keys and values from another given dictionary.
Sourcefn m_init_with_dictionary(&mut self, dictionary: NSDictionary<K, V>)
fn m_init_with_dictionary(&mut self, dictionary: NSDictionary<K, V>)
Creates and initialize a dictionary
Sourcefn m_init_with_dictionary_copy_items(
&mut self,
dictionary: NSDictionary<K, V>,
flag: bool,
)
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.
Sourcefn m_is_equal_to_dictionary<D>(&self, other: D) -> boolwhere
D: INSDictionary<K, V>,
fn m_is_equal_to_dictionary<D>(&self, other: D) -> boolwhere
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.
Sourcefn p_all_keys(&self) -> NSArray<K>
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.
Sourcefn m_all_keys_for_object(&self, object: &V) -> NSArray<K>
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.
Sourcefn p_all_values(&self) -> NSArray<V>
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.
Sourcefn m_value_for_key(&self, key: &K) -> Option<V>where
V: FromId,
fn m_value_for_key(&self, key: &K) -> Option<V>where
V: FromId,
Returns the value associated with a given key.
Sourcefn m_get_objects_and_keys_count(
&self,
objects: *mut V,
keys: *mut K,
count: UInt,
)
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.
Sourcefn m_objects_for_keys_not_found_marker(
&self,
keys: &NSArray<K>,
value: &V,
) -> NSArray<V>
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.
Sourcefn m_object_for_key(&self, key: K) -> Option<V>where
V: FromId,
fn m_object_for_key(&self, key: K) -> Option<V>where
V: FromId,
Returns the value associated with a given key.
Sourcefn m_object_for_keyed_subscript(&self, key: &K) -> Vwhere
V: FromId,
fn m_object_for_keyed_subscript(&self, key: &K) -> Vwhere
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", so this trait is not object safe.