objc_foundation

Struct NSDictionary

Source
pub struct NSDictionary<K, V> { /* private fields */ }

Trait Implementations§

Source§

impl<K, V> INSDictionary for NSDictionary<K, V>
where K: INSObject, V: INSObject,

Source§

type Key = K

Source§

type Value = V

Source§

type Own = Owned

Source§

fn count(&self) -> usize

Source§

fn object_for(&self, key: &Self::Key) -> Option<&Self::Value>

Source§

fn keys(&self) -> Vec<&Self::Key>

Source§

fn values(&self) -> Vec<&Self::Value>

Source§

fn keys_and_objects(&self) -> (Vec<&Self::Key>, Vec<&Self::Value>)

Source§

fn key_enumerator(&self) -> NSEnumerator<'_, Self::Key>

Source§

fn object_enumerator(&self) -> NSEnumerator<'_, Self::Value>

Source§

fn keys_array(&self) -> Id<NSSharedArray<Self::Key>>

Source§

fn from_keys_and_objects<T>( keys: &[&T], vals: Vec<Id<Self::Value, Self::Own>>, ) -> Id<Self>
where T: INSCopying<Output = Self::Key>,

Source§

fn into_values_array(dict: Id<Self>) -> Id<NSArray<Self::Value, Self::Own>>

Source§

impl<K, V> INSFastEnumeration for NSDictionary<K, V>
where K: INSObject, V: INSObject,

Source§

type Item = K

Source§

fn enumerator(&self) -> NSFastEnumerator<'_, Self>

Source§

impl<K, V> INSObject for NSDictionary<K, V>
where K: INSObject, V: INSObject,

Source§

fn class() -> &'static Class

Source§

fn hash_code(&self) -> usize

Source§

fn is_equal<T>(&self, other: &T) -> bool
where T: INSObject,

Source§

fn description(&self) -> ShareId<NSString>

Source§

fn is_kind_of(&self, cls: &Class) -> bool

Source§

fn new() -> Id<Self>

Source§

impl<'a, K, V> Index<&'a K> for NSDictionary<K, V>
where K: INSObject, V: INSObject,

Source§

type Output = V

The returned type after indexing.
Source§

fn index(&self, index: &K) -> &V

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

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

Source§

unsafe fn send_message<A, R>( &self, sel: Sel, args: A, ) -> Result<R, MessageError>
where Self: Sized, A: MessageArguments, R: Any,

Sends a message to self with the given selector and arguments. Read more
Source§

fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
where Self: Sized, A: EncodeArguments, R: Encode,

Verifies that the argument and return types match the encoding of the method for the given selector. Read more

Auto Trait Implementations§

§

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

§

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

§

impl<K, V> Send for NSDictionary<K, V>
where K: Sync, V: Send,

§

impl<K, V> Sync for NSDictionary<K, V>
where K: Sync, V: Sync,

§

impl<K, V> Unpin for NSDictionary<K, V>
where K: Unpin, V: Unpin,

§

impl<K, V> UnwindSafe for NSDictionary<K, V>
where K: UnwindSafe, V: UnwindSafe,

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>,

Source§

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>,

Source§

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.