Struct icrate::Foundation::NSArray

source ·
#[repr(C)]
pub struct NSArray<ObjectType: Message = AnyObject> { /* private fields */ }
Available on crate features Foundation and Foundation_NSArray only.

Implementations§

source§

impl NSArray

This impl block contains no items.

CKRecordValue

source§

impl<T: Message> NSArray<T>

source

pub fn from_vec(vec: Vec<Id<T>>) -> Id<Self>

source

pub fn from_id_slice(slice: &[Id<T>]) -> Id<Self>where T: IsIdCloneable,

source

pub fn from_slice(slice: &[&T]) -> Id<Self>where T: IsRetainable,

source

pub fn to_vec(&self) -> Vec<&T>

source

pub fn to_vec_retained(&self) -> Vec<Id<T>>where T: IsIdCloneable,

source§

impl<T: Message> NSArray<T>

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source§

impl<T: Message> NSArray<T>

source

pub fn get(&self, index: usize) -> Option<&T>

source

pub fn get_retained(&self, index: usize) -> Option<Id<T>>where T: IsIdCloneable,

source

pub fn get_mut(&mut self, index: usize) -> Option<&mut T>where T: IsMutable,

source

pub fn first(&self) -> Option<&T>

source

pub fn first_retained(&self) -> Option<Id<T>>where T: IsIdCloneable,

source

pub fn first_mut(&mut self) -> Option<&mut T>where T: IsMutable,

source

pub fn last(&self) -> Option<&T>

source

pub fn last_retained(&self) -> Option<Id<T>>where T: IsIdCloneable,

source

pub fn last_mut(&mut self) -> Option<&mut T>where T: IsMutable,

source§

impl<T: Message> NSArray<T>

source

pub fn objects_in_range(&self, range: Range<usize>) -> Option<Vec<&T>>

source§

impl<T: Message> NSArray<T>

source

pub fn iter(&self) -> Iter<'_, T>

source

pub fn iter_mut(&mut self) -> IterMut<'_, T> where T: IsMutable,

source

pub fn iter_retained(&self) -> IterRetained<'_, T> where T: IsIdCloneable,

source§

impl<ObjectType: Message> NSArray<ObjectType>

source

pub fn count(&self) -> NSUInteger

source

pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id<ObjectType>

source

pub fn init(this: Option<Allocated<Self>>) -> Id<Self>

source

pub unsafe fn initWithObjects_count( this: Option<Allocated<Self>>, objects: *mut NonNull<ObjectType>, cnt: NSUInteger ) -> Id<Self>

source

pub unsafe fn initWithCoder( this: Option<Allocated<Self>>, coder: &NSCoder ) -> Option<Id<Self>>

Available on crate feature Foundation_NSCoder only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

Methods declared on superclass NSObject

source

pub fn new() -> Id<Self>

source§

impl<ObjectType: Message> NSArray<ObjectType>

NSExtendedArray

source

pub unsafe fn arrayByAddingObject( &self, an_object: &ObjectType ) -> Id<NSArray<ObjectType>>

source

pub unsafe fn arrayByAddingObjectsFromArray( &self, other_array: &NSArray<ObjectType> ) -> Id<NSArray<ObjectType>>

source

pub unsafe fn componentsJoinedByString( &self, separator: &NSString ) -> Id<NSString>

Available on crate feature Foundation_NSString only.
source

pub unsafe fn containsObject(&self, an_object: &ObjectType) -> bool

source

pub unsafe fn description(&self) -> Id<NSString>

Available on crate feature Foundation_NSString only.
source

pub unsafe fn descriptionWithLocale( &self, locale: Option<&AnyObject> ) -> Id<NSString>

Available on crate feature Foundation_NSString only.
source

pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&AnyObject>, level: NSUInteger ) -> Id<NSString>

Available on crate feature Foundation_NSString only.
source

pub unsafe fn firstObjectCommonWithArray( &self, other_array: &NSArray<ObjectType> ) -> Option<Id<ObjectType>>

source

pub unsafe fn getObjects_range( &self, objects: NonNull<NonNull<ObjectType>>, range: NSRange )

source

pub unsafe fn indexOfObject(&self, an_object: &ObjectType) -> NSUInteger

source

pub unsafe fn indexOfObject_inRange( &self, an_object: &ObjectType, range: NSRange ) -> NSUInteger

source

pub unsafe fn indexOfObjectIdenticalTo( &self, an_object: &ObjectType ) -> NSUInteger

source

pub unsafe fn indexOfObjectIdenticalTo_inRange( &self, an_object: &ObjectType, range: NSRange ) -> NSUInteger

source

pub unsafe fn isEqualToArray(&self, other_array: &NSArray<ObjectType>) -> bool

source

pub unsafe fn firstObject(&self) -> Option<Id<ObjectType>>

source

pub unsafe fn lastObject(&self) -> Option<Id<ObjectType>>

source

pub unsafe fn objectEnumerator(&self) -> Id<NSEnumerator<ObjectType>>

Available on crate feature Foundation_NSEnumerator only.
source

pub unsafe fn reverseObjectEnumerator(&self) -> Id<NSEnumerator<ObjectType>>

Available on crate feature Foundation_NSEnumerator only.
source

pub unsafe fn sortedArrayHint(&self) -> Id<NSData>

Available on crate feature Foundation_NSData only.
source

pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: unsafe extern "C" fn(_: NonNull<ObjectType>, _: NonNull<ObjectType>, _: *mut c_void) -> NSInteger, context: *mut c_void ) -> Id<NSArray<ObjectType>>

source

pub unsafe fn sortedArrayUsingFunction_context_hint( &self, comparator: unsafe extern "C" fn(_: NonNull<ObjectType>, _: NonNull<ObjectType>, _: *mut c_void) -> NSInteger, context: *mut c_void, hint: Option<&NSData> ) -> Id<NSArray<ObjectType>>

Available on crate feature Foundation_NSData only.
source

pub unsafe fn sortedArrayUsingSelector( &self, comparator: Sel ) -> Id<NSArray<ObjectType>>

source

pub unsafe fn subarrayWithRange( &self, range: NSRange ) -> Id<NSArray<ObjectType>>

source

pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id<NSError>>

Available on crate features Foundation_NSError and Foundation_NSURL only.
source

pub unsafe fn makeObjectsPerformSelector(&self, a_selector: Sel)

source

pub unsafe fn makeObjectsPerformSelector_withObject( &self, a_selector: Sel, argument: Option<&AnyObject> )

source

pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet ) -> Id<NSArray<ObjectType>>

Available on crate feature Foundation_NSIndexSet only.
source

pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id<ObjectType>

source

pub unsafe fn enumerateObjectsUsingBlock( &self, block: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), ()> )

source

pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), ()> )

source

pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, s: &NSIndexSet, opts: NSEnumerationOptions, block: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), ()> )

Available on crate feature Foundation_NSIndexSet only.
source

pub unsafe fn indexOfObjectPassingTest( &self, predicate: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), Bool> ) -> NSUInteger

source

pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), Bool> ) -> NSUInteger

source

pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), Bool> ) -> NSUInteger

Available on crate feature Foundation_NSIndexSet only.
source

pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), Bool> ) -> Id<NSIndexSet>

Available on crate feature Foundation_NSIndexSet only.
source

pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), Bool> ) -> Id<NSIndexSet>

Available on crate feature Foundation_NSIndexSet only.
source

pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: &Block<(NonNull<ObjectType>, NSUInteger, NonNull<Bool>), Bool> ) -> Id<NSIndexSet>

Available on crate feature Foundation_NSIndexSet only.
source

pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator ) -> Id<NSArray<ObjectType>>

source

pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator ) -> Id<NSArray<ObjectType>>

source

pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, obj: &ObjectType, r: NSRange, opts: NSBinarySearchingOptions, cmp: NSComparator ) -> NSUInteger

source§

impl<ObjectType: Message> NSArray<ObjectType>

NSArrayCreation

source

pub unsafe fn array() -> Id<Self>

source

pub unsafe fn arrayWithObject(an_object: &ObjectType) -> Id<Self>

source

pub unsafe fn arrayWithObjects_count( objects: NonNull<NonNull<ObjectType>>, cnt: NSUInteger ) -> Id<Self>

source

pub unsafe fn arrayWithArray(array: &NSArray<ObjectType>) -> Id<Self>

source

pub unsafe fn initWithArray( this: Option<Allocated<Self>>, array: &NSArray<ObjectType> ) -> Id<Self>

source

pub unsafe fn initWithArray_copyItems( this: Option<Allocated<Self>>, array: &NSArray<ObjectType>, flag: bool ) -> Id<Self>

source

pub unsafe fn initWithContentsOfURL_error( this: Option<Allocated<Self>>, url: &NSURL ) -> Result<Id<NSArray<ObjectType>>, Id<NSError>>

Available on crate features Foundation_NSError and Foundation_NSURL only.
source

pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL ) -> Result<Id<NSArray<ObjectType>>, Id<NSError>>

Available on crate features Foundation_NSError and Foundation_NSURL only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSArrayDiffing

source

pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( &self, other: &NSArray<ObjectType>, options: NSOrderedCollectionDifferenceCalculationOptions, block: &Block<(NonNull<ObjectType>, NonNull<ObjectType>), Bool> ) -> Id<NSOrderedCollectionDifference<ObjectType>>

Available on crate feature Foundation_NSOrderedCollectionDifference only.
source

pub unsafe fn differenceFromArray_withOptions( &self, other: &NSArray<ObjectType>, options: NSOrderedCollectionDifferenceCalculationOptions ) -> Id<NSOrderedCollectionDifference<ObjectType>>

Available on crate feature Foundation_NSOrderedCollectionDifference only.
source

pub unsafe fn differenceFromArray( &self, other: &NSArray<ObjectType> ) -> Id<NSOrderedCollectionDifference<ObjectType>>

Available on crate feature Foundation_NSOrderedCollectionDifference only.
source

pub unsafe fn arrayByApplyingDifference( &self, difference: &NSOrderedCollectionDifference<ObjectType> ) -> Option<Id<NSArray<ObjectType>>>

Available on crate feature Foundation_NSOrderedCollectionDifference only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSDeprecated

source

pub unsafe fn getObjects(&self, objects: NonNull<NonNull<ObjectType>>)

👎Deprecated: Use -getObjects:range: instead
source

pub unsafe fn arrayWithContentsOfFile( path: &NSString ) -> Option<Id<NSArray<ObjectType>>>

👎Deprecated
Available on crate feature Foundation_NSString only.
source

pub unsafe fn arrayWithContentsOfURL( url: &NSURL ) -> Option<Id<NSArray<ObjectType>>>

👎Deprecated
Available on crate feature Foundation_NSURL only.
source

pub unsafe fn initWithContentsOfFile( this: Option<Allocated<Self>>, path: &NSString ) -> Option<Id<NSArray<ObjectType>>>

👎Deprecated
Available on crate feature Foundation_NSString only.
source

pub unsafe fn initWithContentsOfURL( this: Option<Allocated<Self>>, url: &NSURL ) -> Option<Id<NSArray<ObjectType>>>

👎Deprecated
Available on crate feature Foundation_NSURL only.
source

pub unsafe fn writeToFile_atomically( &self, path: &NSString, use_auxiliary_file: bool ) -> bool

👎Deprecated
Available on crate feature Foundation_NSString only.
source

pub unsafe fn writeToURL_atomically( &self, url: &NSURL, atomically: bool ) -> bool

👎Deprecated
Available on crate feature Foundation_NSURL only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSKeyValueCoding

source

pub unsafe fn valueForKey(&self, key: &NSString) -> Id<AnyObject>

Available on crate feature Foundation_NSString only.
source

pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString)

Available on crate feature Foundation_NSString only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSKeyValueObserverRegistration

source

pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( &self, observer: &NSObject, indexes: &NSIndexSet, key_path: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void )

Available on crate features Foundation_NSIndexSet and Foundation_NSString only.
source

pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( &self, observer: &NSObject, indexes: &NSIndexSet, key_path: &NSString, context: *mut c_void )

Available on crate features Foundation_NSIndexSet and Foundation_NSString only.
source

pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( &self, observer: &NSObject, indexes: &NSIndexSet, key_path: &NSString )

Available on crate features Foundation_NSIndexSet and Foundation_NSString only.
source

pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, key_path: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void )

Available on crate feature Foundation_NSString only.
source

pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, key_path: &NSString, context: *mut c_void )

Available on crate feature Foundation_NSString only.
source

pub unsafe fn removeObserver_forKeyPath( &self, observer: &NSObject, key_path: &NSString )

Available on crate feature Foundation_NSString only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSArrayPathExtensions

source

pub unsafe fn pathsMatchingExtensions( &self, filter_types: &NSArray<NSString> ) -> Id<NSArray<NSString>>

Available on crate feature Foundation_NSString only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSPredicateSupport

source

pub unsafe fn filteredArrayUsingPredicate( &self, predicate: &NSPredicate ) -> Id<NSArray<ObjectType>>

Available on crate feature Foundation_NSPredicate only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSSortDescriptorSorting

source

pub unsafe fn sortedArrayUsingDescriptors( &self, sort_descriptors: &NSArray<NSSortDescriptor> ) -> Id<NSArray<ObjectType>>

Available on crate feature Foundation_NSSortDescriptor only.

Methods from Deref<Target = AnyObject>§

source

pub fn class(&self) -> &AnyClass

Dynamically find the class of this object.

source

pub unsafe fn ivar_ptr<T>(&self, name: &str) -> *mut Twhere T: Encode,

Returns a pointer to the instance variable / ivar with the given name.

This is similar to UnsafeCell::get, see that for more information on what is and isn’t safe to do.

Usually you will have defined the instance variable yourself with ClassBuilder::add_ivar, the type of the ivar T must match the type used in that.

Attempting to access or modify private implementation details of a class that you do no control using this is not supported, and may invoke undefined behaviour.

Library implementors are strongly encouraged to expose a safe interface to the ivar.

Panics

May panic if the object has no ivar with the given name. May also panic if the type encoding of the ivar differs from the type encoding of T.

This should purely seen as help while debugging and is not guaranteed (e.g. it may be disabled when debug_assertions are off).

Safety

The object must have an instance variable with the given name, and it must be of type T. Any invariants that the object have assumed about the value of the instance variable must not be violated.

No thread syncronization is done on accesses to the variable, so you must ensure that any access to the returned pointer do not cause data races, and that Rust’s mutability rules are not otherwise violated.

source

pub unsafe fn ivar<T>(&self, name: &str) -> &Twhere T: Encode,

Returns a reference to the instance variable with the given name.

See AnyObject::ivar_ptr for more information, including on when this panics.

Safety

The object must have an instance variable with the given name, and it must be of type T.

No thread syncronization is done, so you must ensure that no other thread is concurrently mutating the variable. This requirement can be considered upheld if all mutation happens through AnyObject::ivar_mut (since that takes &mut self).

source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere T: Encode,

👎Deprecated: Use AnyObject::ivar instead.
source

pub unsafe fn ivar_mut<T>(&mut self, name: &str) -> &mut Twhere T: Encode,

Returns a mutable reference to the ivar with the given name.

See AnyObject::ivar_ptr for more information, including on when this panics.

Safety

The object must have an instance variable with the given name, and it must be of type T.

This access happens through &mut self, which means we know it to be the only reference, hence you do not need to do any work to ensure that data races do not happen.

source

pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere T: Encode,

👎Deprecated: Use AnyObject::ivar_mut instead.
source

pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)where T: Encode,

Sets the value of the ivar with the given name.

This is a shorthand for AnyObject::ivar_mut, see that for more information.

Safety

Same as AnyObject::ivar_mut.

Trait Implementations§

source§

impl<ObjectType: Message> AsMut<AnyObject> for NSArray<ObjectType>

source§

fn as_mut(&mut self) -> &mut AnyObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> AsMut<NSArray<ObjectType>> for NSArray<ObjectType>

source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> AsMut<NSArray<ObjectType>> for NSMutableArray<ObjectType>

source§

fn as_mut(&mut self) -> &mut NSArray<ObjectType>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> AsMut<NSObject> for NSArray<ObjectType>

source§

fn as_mut(&mut self) -> &mut NSObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> AsRef<AnyObject> for NSArray<ObjectType>

source§

fn as_ref(&self) -> &AnyObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> AsRef<NSArray<ObjectType>> for NSArray<ObjectType>

source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> AsRef<NSArray<ObjectType>> for NSMutableArray<ObjectType>

source§

fn as_ref(&self) -> &NSArray<ObjectType>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> AsRef<NSObject> for NSArray<ObjectType>

source§

fn as_ref(&self) -> &NSObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<ObjectType: Message> Borrow<AnyObject> for NSArray<ObjectType>

source§

fn borrow(&self) -> &AnyObject

Immutably borrows from an owned value. Read more
source§

impl<ObjectType: Message> Borrow<NSArray<ObjectType>> for NSMutableArray<ObjectType>

source§

fn borrow(&self) -> &NSArray<ObjectType>

Immutably borrows from an owned value. Read more
source§

impl<ObjectType: Message> Borrow<NSObject> for NSArray<ObjectType>

source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
source§

impl<ObjectType: Message> BorrowMut<AnyObject> for NSArray<ObjectType>

source§

fn borrow_mut(&mut self) -> &mut AnyObject

Mutably borrows from an owned value. Read more
source§

impl<ObjectType: Message> BorrowMut<NSArray<ObjectType>> for NSMutableArray<ObjectType>

source§

fn borrow_mut(&mut self) -> &mut NSArray<ObjectType>

Mutably borrows from an owned value. Read more
source§

impl<ObjectType: Message> BorrowMut<NSObject> for NSArray<ObjectType>

source§

fn borrow_mut(&mut self) -> &mut NSObject

Mutably borrows from an owned value. Read more
source§

impl<ObjectType: Message> ClassType for NSArray<ObjectType>

§

type Super = NSObject

The superclass of this class. Read more
§

type Mutability = ImmutableWithMutableSubclass<NSMutableArray<ObjectType>>

Whether the type is mutable or immutable. Read more
source§

const NAME: &'static str = _

The name of the Objective-C class that this type represents. Read more
source§

fn class() -> &'static AnyClass

Get a reference to the Objective-C class that this type represents. Read more
source§

fn as_super(&self) -> &Self::Super

Get an immutable reference to the superclass.
source§

fn as_super_mut(&mut self) -> &mut Self::Super

Get a mutable reference to the superclass.
source§

fn alloc() -> Option<Allocated<Self>>where Self: IsAllocableAnyThread,

Allocate a new instance of the class. Read more
source§

impl<T: Debug + Message> Debug for NSArray<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<ObjectType: Message> DefaultId for NSArray<ObjectType>

source§

fn default_id() -> Id<Self>

The default Id for a type. Read more
source§

impl<ObjectType: Message> Deref for NSArray<ObjectType>

§

type Target = NSObject

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<ObjectType: Message> DerefMut for NSArray<ObjectType>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<ObjectType: Hash + Message> Hash for NSArray<ObjectType>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a, T: IsRetainable + 'a> IdFromIterator<&'a T> for NSArray<T>

source§

fn id_from_iter<I: IntoIterator<Item = &'a T>>(iter: I) -> Id<Self>

Creates an Id from an iterator.
source§

impl<T: Message> IdFromIterator<Id<T>> for NSArray<T>

source§

fn id_from_iter<I: IntoIterator<Item = Id<T>>>(iter: I) -> Id<Self>

Creates an Id from an iterator.
source§

impl<T: IsIdCloneable> IdIntoIterator for NSArray<T>

§

type Item = Id<T>

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
source§

fn id_into_iter(this: Id<Self>) -> Self::IntoIter

Creates an iterator from an Id. Read more
source§

impl<T: Message> Index<usize> for NSArray<T>

§

type Output = T

The returned type after indexing.
source§

fn index(&self, index: usize) -> &T

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

impl<T: IsMutable> IndexMut<usize> for NSArray<T>

source§

fn index_mut(&mut self, index: usize) -> &mut T

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

impl<'a, T: Message> IntoIterator for &'a NSArray<T>

§

type Item = &'a T

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T: IsMutable> IntoIterator for &'a mut NSArray<T>

§

type Item = &'a mut T

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<ObjectType: Message + NSCoding> NSCoding for NSArray<ObjectType>

source§

unsafe fn encodeWithCoder(&self, coder: &NSCoder)where Self: Sized + Message,

Available on crate feature Foundation_NSCoder only.
source§

unsafe fn initWithCoder( this: Option<Allocated<Self>>, coder: &NSCoder ) -> Option<Id<Self>>where Self: Sized + Message,

Available on crate feature Foundation_NSCoder only.
source§

impl<ObjectType: Message> NSFastEnumeration for NSArray<ObjectType>

source§

impl<ObjectType: Message> NSObjectProtocol for NSArray<ObjectType>

source§

fn is_kind_of<T>(&self) -> boolwhere T: ClassType, Self: Sized + Message,

Check if the object is an instance of the class, or one of it’s subclasses. Read more
source§

impl<ObjectType: Message + NSSecureCoding> NSSecureCoding for NSArray<ObjectType>

source§

unsafe fn supportsSecureCoding() -> boolwhere Self: Sized + ClassType,

source§

impl<ObjectType: PartialEq + Message> PartialEq<NSArray<ObjectType>> for NSArray<ObjectType>

source§

fn eq(&self, other: &NSArray<ObjectType>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<ObjectType: Message> RefEncode for NSArray<ObjectType>

source§

const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF

The Objective-C type-encoding for a reference of this type. Read more
source§

impl<T: IsIdCloneable> ToOwned for NSArray<T>

§

type Owned = Id<NSArray<T>>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl CKRecordValue for NSArray

Available on crate feature CloudKit only.
source§

impl<ObjectType: Eq + Message> Eq for NSArray<ObjectType>

source§

impl<ObjectType: Message> Message for NSArray<ObjectType>

source§

impl<ObjectType: IsIdCloneable> NSCopying for NSArray<ObjectType>

source§

impl<ObjectType: IsIdCloneable> NSMutableCopying for NSArray<ObjectType>

source§

impl<ObjectType: Message> StructuralEq for NSArray<ObjectType>

source§

impl<ObjectType: Message> StructuralPartialEq for NSArray<ObjectType>

Auto Trait Implementations§

§

impl<ObjectType> RefUnwindSafe for NSArray<ObjectType>where ObjectType: RefUnwindSafe,

§

impl<ObjectType> Send for NSArray<ObjectType>where ObjectType: Send + ClassType, <<ObjectType as ClassType>::Mutability as IdSendSyncHelper<ObjectType>>::EquivalentType: Send, <ObjectType as ClassType>::Mutability: IdSendSyncHelper<ObjectType>,

§

impl<ObjectType> Sync for NSArray<ObjectType>where ObjectType: Sync + ClassType, <<ObjectType as ClassType>::Mutability as IdSendSyncHelper<ObjectType>>::EquivalentType: Sync, <ObjectType as ClassType>::Mutability: IdSendSyncHelper<ObjectType>,

§

impl<ObjectType = AnyObject> !Unpin for NSArray<ObjectType>

§

impl<ObjectType> UnwindSafe for NSArray<ObjectType>where ObjectType: UnwindSafe + RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> AutoreleaseSafe for Twhere T: ?Sized,