Struct objc2_foundation::NSArray

source ·
#[repr(C)]
pub struct NSArray<ObjectType: ?Sized = AnyObject> { /* private fields */ }
Available on crate feature NSArray only.

Implementations§

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>

Available on crate feature NSRange only.
source

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

Available on crate feature NSRange only.
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>>

Available on crate feature NSRange only.
source§

impl<T: Message> NSArray<T>

source

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

Available on crate feature NSEnumerator only.
source

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

Available on crate feature NSEnumerator only.
source

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

Available on crate feature NSEnumerator only.
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: Allocated<Self>) -> Id<Self>

source

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

source

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

Available on crate feature 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 NSString only.
source

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

source

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

Available on crate feature NSString only.
source

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

Available on crate feature NSString only.
source

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

Available on crate feature 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 )

Available on crate feature NSRange only.
source

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

source

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

Available on crate feature NSRange only.
source

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

source

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

Available on crate feature NSRange only.
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 NSEnumerator only.
source

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

Available on crate feature NSEnumerator only.
source

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

Available on crate feature 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 NSData only.
source

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

source

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

Available on crate feature NSRange only.
source

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

Available on crate features NSError and 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 NSIndexSet only.
source

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

source

pub unsafe fn enumerateObjectsUsingBlock( &self, block: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) + '_> )

Available on crate feature block2 only.
source

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

Available on crate features NSObjCRuntime and block2 only.
source

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

Available on crate features NSIndexSet and NSObjCRuntime and block2 only.
source

pub unsafe fn indexOfObjectPassingTest( &self, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> NSUInteger

Available on crate feature block2 only.
source

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

Available on crate features NSObjCRuntime and block2 only.
source

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

Available on crate features NSIndexSet and NSObjCRuntime and block2 only.
source

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

Available on crate features NSIndexSet and block2 only.
source

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

Available on crate features NSIndexSet and NSObjCRuntime and block2 only.
source

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

Available on crate features NSIndexSet and NSObjCRuntime and block2 only.
source

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

Available on crate features NSObjCRuntime and block2 only.
source

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

Available on crate features NSObjCRuntime and block2 only.
source

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

Available on crate features NSObjCRuntime and NSRange and block2 only.
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: Allocated<Self>, array: &NSArray<ObjectType> ) -> Id<Self>

source

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

source

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

Available on crate features NSError and NSURL only.
source

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

Available on crate features NSError and NSURL only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSArrayDiffing

source

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

Available on crate features NSOrderedCollectionDifference and block2 only.
source

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

Available on crate feature NSOrderedCollectionDifference only.
source

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

Available on crate feature NSOrderedCollectionDifference only.
source

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

Available on crate feature 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 NSString only.
source

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

👎Deprecated
Available on crate feature NSURL only.
source

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

👎Deprecated
Available on crate feature NSString only.
source

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

👎Deprecated
Available on crate feature NSURL only.
source

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

👎Deprecated
Available on crate feature NSString only.
source

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

👎Deprecated
Available on crate feature NSURL only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSKeyValueCoding

source

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

Available on crate features NSKeyValueCoding and NSString only.
source

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

Available on crate features NSKeyValueCoding and 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 NSKeyValueObserving and NSIndexSet and 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 NSKeyValueObserving and NSIndexSet and NSString only.
source

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

Available on crate features NSKeyValueObserving and NSIndexSet and 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 features NSKeyValueObserving and NSString only.
source

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

Available on crate features NSKeyValueObserving and NSString only.
source

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

Available on crate features NSKeyValueObserving and 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 features NSPathUtilities and NSString only.
source§

impl<ObjectType: Message> NSArray<ObjectType>

NSPredicateSupport

source

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

Available on crate feature 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 NSSortDescriptor only.

Methods from Deref<Target = NSObject>§

source

pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !

Handle messages the object doesn’t recognize.

See Apple’s documentation for details.

Methods from Deref<Target = AnyObject>§

source

pub fn class(&self) -> &'static AnyClass

Dynamically find the class of this object.

§Example

Check that an instance of NSObject has the precise class NSObject.

use objc2::ClassType;
use objc2::runtime::NSObject;

let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
source

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

👎Deprecated: this is difficult to use correctly, use Ivar::load instead.

Use Ivar::load instead.

§Safety

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

See Ivar::load_ptr for details surrounding this.

source

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

👎Deprecated: this is difficult to use correctly, use Ivar::load_mut instead.

Use Ivar::load_mut instead.

§Safety

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

See Ivar::load_ptr for details surrounding this.

Trait Implementations§

source§

impl<ObjectType: ?Sized + 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: ?Sized + 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: ?Sized + 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: ?Sized + 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: ?Sized + 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: ?Sized + 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: ?Sized + 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: ?Sized + 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: ?Sized + Message> Borrow<AnyObject> for NSArray<ObjectType>

source§

fn borrow(&self) -> &AnyObject

Immutably borrows from an owned value. Read more
source§

impl<ObjectType: ?Sized + Message> Borrow<NSArray<ObjectType>> for NSMutableArray<ObjectType>

source§

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

Immutably borrows from an owned value. Read more
source§

impl<ObjectType: ?Sized + Message> Borrow<NSObject> for NSArray<ObjectType>

source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
source§

impl<ObjectType: ?Sized + 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: ?Sized + 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: ?Sized + 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: ?Sized + 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 = "NSArray"

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() -> Allocated<Self>

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

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

Available on crate feature NSEnumerator only.
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: ?Sized + 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: ?Sized + Message> DerefMut for NSArray<ObjectType>

source§

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

Mutably dereferences the value.
source§

impl<ObjectType: Hash + ?Sized> 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: Message + 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: Message + 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: Message + 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: Message + 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: PartialEq + ?Sized> PartialEq 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: ?Sized + 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: Message + IsIdCloneable> ToOwned for NSArray<T>

Available on crate feature NSObject only.
§

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<ObjectType: Eq + ?Sized> Eq for NSArray<ObjectType>

source§

impl<ObjectType: ?Sized + Message> Message for NSArray<ObjectType>

source§

impl<ObjectType: ?Sized + NSCoding> NSCoding for NSArray<ObjectType>

Available on crate feature NSObject only.
source§

impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSArray<ObjectType>

Available on crate feature NSObject only.
source§

impl<ObjectType: ?Sized> NSFastEnumeration for NSArray<ObjectType>

Available on crate feature NSEnumerator only.
source§

impl<ObjectType: ?Sized + IsIdCloneable> NSMutableCopying for NSArray<ObjectType>

Available on crate feature NSObject only.
source§

impl<ObjectType: ?Sized> NSObjectProtocol for NSArray<ObjectType>

source§

impl<ObjectType: ?Sized + NSSecureCoding> NSSecureCoding for NSArray<ObjectType>

Available on crate feature NSObject only.
source§

impl<ObjectType: ?Sized> StructuralPartialEq for NSArray<ObjectType>

Auto Trait Implementations§

§

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

§

impl<ObjectType> RefUnwindSafe for NSArray<ObjectType>
where ObjectType: RefUnwindSafe + ?Sized,

§

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

§

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

§

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

§

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

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

§

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

§

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 T
where T: ?Sized,