Struct objc2_foundation::NSMutableArray
source · #[repr(C)]pub struct NSMutableArray<ObjectType: ?Sized = AnyObject> { /* private fields */ }
Available on crate feature
NSArray
only.Implementations§
source§impl<T: Message> NSMutableArray<T>
impl<T: Message> NSMutableArray<T>
pub fn from_vec(vec: Vec<Retained<T>>) -> Retained<Self>
pub fn from_id_slice(slice: &[Retained<T>]) -> Retained<Self>where
T: IsIdCloneable,
pub fn from_slice(slice: &[&T]) -> Retained<Self>where
T: IsRetainable,
pub fn into_vec(array: Retained<Self>) -> Vec<Retained<T>>
Available on crate feature
NSRange
only.source§impl<T: Message> NSMutableArray<T>
impl<T: Message> NSMutableArray<T>
pub fn push(&mut self, obj: Retained<T>)
pub fn insert(&mut self, index: usize, obj: Retained<T>)
pub fn replace( &mut self, index: usize, obj: Retained<T> ) -> Result<Retained<T>, Retained<T>>
pub fn remove(&mut self, index: usize) -> Option<Retained<T>>
pub fn pop(&mut self) -> Option<Retained<T>>
pub fn sort_by<F: FnMut(&T, &T) -> Ordering>(&mut self, compare: F)
Available on crate feature
NSObjCRuntime
only.source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
Methods declared on superclass NSArray
NSArrayCreation
pub unsafe fn array() -> Retained<Self>
pub unsafe fn arrayWithObject(an_object: &ObjectType) -> Retained<Self>
pub unsafe fn arrayWithObjects_count( objects: NonNull<NonNull<ObjectType>>, cnt: NSUInteger ) -> Retained<Self>
pub unsafe fn arrayWithArray(array: &NSArray<ObjectType>) -> Retained<Self>
pub unsafe fn initWithArray( this: Allocated<Self>, array: &NSArray<ObjectType> ) -> Retained<Self>
pub unsafe fn initWithArray_copyItems( this: Allocated<Self>, array: &NSArray<ObjectType>, flag: bool ) -> Retained<Self>
source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
pub unsafe fn addObject(&mut self, an_object: &ObjectType)
pub unsafe fn insertObject_atIndex( &mut self, an_object: &ObjectType, index: NSUInteger )
pub unsafe fn removeLastObject(&mut self)
pub unsafe fn removeObjectAtIndex(&mut self, index: NSUInteger)
pub unsafe fn replaceObjectAtIndex_withObject( &mut self, index: NSUInteger, an_object: &ObjectType )
pub fn init(this: Allocated<Self>) -> Retained<Self>
pub unsafe fn initWithCapacity( this: Allocated<Self>, num_items: NSUInteger ) -> Retained<Self>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Option<Retained<Self>>
Available on crate feature
NSCoder
only.source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
Methods declared on superclass NSArray
pub unsafe fn initWithObjects_count( this: Allocated<Self>, objects: *mut NonNull<ObjectType>, cnt: NSUInteger ) -> Retained<Self>
source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
Methods declared on superclass NSObject
source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
NSExtendedMutableArray
pub unsafe fn addObjectsFromArray(&mut self, other_array: &NSArray<ObjectType>)
pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &mut self, idx1: NSUInteger, idx2: NSUInteger )
pub fn removeAllObjects(&mut self)
pub unsafe fn removeObject_inRange( &mut self, an_object: &ObjectType, range: NSRange )
Available on crate feature
NSRange
only.pub unsafe fn removeObject(&mut self, an_object: &ObjectType)
pub unsafe fn removeObjectIdenticalTo_inRange( &mut self, an_object: &ObjectType, range: NSRange )
Available on crate feature
NSRange
only.pub unsafe fn removeObjectIdenticalTo(&mut self, an_object: &ObjectType)
pub unsafe fn removeObjectsFromIndices_numIndices( &mut self, indices: NonNull<NSUInteger>, cnt: NSUInteger )
👎Deprecated: Not supported
pub unsafe fn removeObjectsInArray(&mut self, other_array: &NSArray<ObjectType>)
pub unsafe fn removeObjectsInRange(&mut self, range: NSRange)
Available on crate feature
NSRange
only.pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( &mut self, range: NSRange, other_array: &NSArray<ObjectType>, other_range: NSRange )
Available on crate feature
NSRange
only.pub unsafe fn replaceObjectsInRange_withObjectsFromArray( &mut self, range: NSRange, other_array: &NSArray<ObjectType> )
Available on crate feature
NSRange
only.pub unsafe fn setArray(&mut self, other_array: &NSArray<ObjectType>)
pub unsafe fn sortUsingFunction_context( &mut self, compare: unsafe extern "C" fn(_: NonNull<ObjectType>, _: NonNull<ObjectType>, _: *mut c_void) -> NSInteger, context: *mut c_void )
pub unsafe fn sortUsingSelector(&mut self, comparator: Sel)
pub unsafe fn insertObjects_atIndexes( &mut self, objects: &NSArray<ObjectType>, indexes: &NSIndexSet )
Available on crate feature
NSIndexSet
only.pub unsafe fn removeObjectsAtIndexes(&mut self, indexes: &NSIndexSet)
Available on crate feature
NSIndexSet
only.pub unsafe fn replaceObjectsAtIndexes_withObjects( &mut self, indexes: &NSIndexSet, objects: &NSArray<ObjectType> )
Available on crate feature
NSIndexSet
only.pub unsafe fn setObject_atIndexedSubscript( &mut self, obj: &ObjectType, idx: NSUInteger )
pub unsafe fn sortUsingComparator(&mut self, cmptr: NSComparator)
Available on crate features
NSObjCRuntime
and block2
only.pub unsafe fn sortWithOptions_usingComparator( &mut self, opts: NSSortOptions, cmptr: NSComparator )
Available on crate features
NSObjCRuntime
and block2
only.source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
NSMutableArrayCreation
pub unsafe fn arrayWithCapacity(num_items: NSUInteger) -> Retained<Self>
pub unsafe fn arrayWithContentsOfFile( path: &NSString ) -> Option<Retained<NSMutableArray<ObjectType>>>
Available on crate feature
NSString
only.pub unsafe fn arrayWithContentsOfURL( url: &NSURL ) -> Option<Retained<NSMutableArray<ObjectType>>>
Available on crate feature
NSURL
only.pub unsafe fn initWithContentsOfFile( this: Allocated<Self>, path: &NSString ) -> Option<Retained<NSMutableArray<ObjectType>>>
Available on crate feature
NSString
only.pub unsafe fn initWithContentsOfURL( this: Allocated<Self>, url: &NSURL ) -> Option<Retained<NSMutableArray<ObjectType>>>
Available on crate feature
NSURL
only.source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
NSMutableArrayDiffing
pub unsafe fn applyDifference( &mut self, difference: &NSOrderedCollectionDifference<ObjectType> )
Available on crate feature
NSOrderedCollectionDifference
only.source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
NSPredicateSupport
pub unsafe fn filterUsingPredicate(&mut self, predicate: &NSPredicate)
Available on crate feature
NSPredicate
only.source§impl<ObjectType: Message> NSMutableArray<ObjectType>
impl<ObjectType: Message> NSMutableArray<ObjectType>
NSSortDescriptorSorting
pub unsafe fn sortUsingDescriptors( &mut self, sort_descriptors: &NSArray<NSSortDescriptor> )
Available on crate feature
NSSortDescriptor
only.Methods from Deref<Target = NSArray<ObjectType>>§
pub fn to_vec(&self) -> Vec<&T>
Available on crate feature
NSRange
only.pub fn to_vec_retained(&self) -> Vec<Retained<T>>where
T: IsIdCloneable,
Available on crate feature
NSRange
only.pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<&T>
pub fn get_retained(&self, index: usize) -> Option<Retained<T>>where
T: IsIdCloneable,
pub fn get_mut(&mut self, index: usize) -> Option<&mut T>where
T: IsMutable,
pub fn first(&self) -> Option<&T>
pub fn first_retained(&self) -> Option<Retained<T>>where
T: IsIdCloneable,
pub fn first_mut(&mut self) -> Option<&mut T>where
T: IsMutable,
pub fn last(&self) -> Option<&T>
pub fn last_retained(&self) -> Option<Retained<T>>where
T: IsIdCloneable,
pub fn last_mut(&mut self) -> Option<&mut T>where
T: IsMutable,
pub fn objects_in_range(&self, range: Range<usize>) -> Option<Vec<&T>>
Available on crate feature
NSRange
only.pub fn iter(&self) -> Iter<'_, T> ⓘ
Available on crate feature
NSEnumerator
only.pub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘwhere
T: IsMutable,
Available on crate feature
NSEnumerator
only.pub fn iter_retained(&self) -> IterRetained<'_, T> ⓘwhere
T: IsIdCloneable,
Available on crate feature
NSEnumerator
only.pub fn count(&self) -> NSUInteger
pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Retained<ObjectType>
pub unsafe fn arrayByAddingObject( &self, an_object: &ObjectType ) -> Retained<NSArray<ObjectType>>
pub unsafe fn arrayByAddingObjectsFromArray( &self, other_array: &NSArray<ObjectType> ) -> Retained<NSArray<ObjectType>>
pub unsafe fn componentsJoinedByString( &self, separator: &NSString ) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn containsObject(&self, an_object: &ObjectType) -> bool
pub unsafe fn description(&self) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn descriptionWithLocale( &self, locale: Option<&AnyObject> ) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&AnyObject>, level: NSUInteger ) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn firstObjectCommonWithArray( &self, other_array: &NSArray<ObjectType> ) -> Option<Retained<ObjectType>>
pub unsafe fn getObjects_range( &self, objects: NonNull<NonNull<ObjectType>>, range: NSRange )
Available on crate feature
NSRange
only.pub unsafe fn indexOfObject(&self, an_object: &ObjectType) -> NSUInteger
pub unsafe fn indexOfObject_inRange( &self, an_object: &ObjectType, range: NSRange ) -> NSUInteger
Available on crate feature
NSRange
only.pub unsafe fn indexOfObjectIdenticalTo( &self, an_object: &ObjectType ) -> NSUInteger
pub unsafe fn indexOfObjectIdenticalTo_inRange( &self, an_object: &ObjectType, range: NSRange ) -> NSUInteger
Available on crate feature
NSRange
only.pub unsafe fn isEqualToArray(&self, other_array: &NSArray<ObjectType>) -> bool
pub unsafe fn firstObject(&self) -> Option<Retained<ObjectType>>
pub unsafe fn lastObject(&self) -> Option<Retained<ObjectType>>
pub unsafe fn objectEnumerator(&self) -> Retained<NSEnumerator<ObjectType>>
Available on crate feature
NSEnumerator
only.pub unsafe fn reverseObjectEnumerator( &self ) -> Retained<NSEnumerator<ObjectType>>
Available on crate feature
NSEnumerator
only.pub unsafe fn sortedArrayHint(&self) -> Retained<NSData>
Available on crate feature
NSData
only.pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: unsafe extern "C" fn(_: NonNull<ObjectType>, _: NonNull<ObjectType>, _: *mut c_void) -> NSInteger, context: *mut c_void ) -> Retained<NSArray<ObjectType>>
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> ) -> Retained<NSArray<ObjectType>>
Available on crate feature
NSData
only.pub unsafe fn sortedArrayUsingSelector( &self, comparator: Sel ) -> Retained<NSArray<ObjectType>>
pub unsafe fn subarrayWithRange( &self, range: NSRange ) -> Retained<NSArray<ObjectType>>
Available on crate feature
NSRange
only.pub unsafe fn writeToURL_error( &self, url: &NSURL ) -> Result<(), Retained<NSError>>
Available on crate features
NSError
and NSURL
only.pub unsafe fn makeObjectsPerformSelector(&self, a_selector: Sel)
pub unsafe fn makeObjectsPerformSelector_withObject( &self, a_selector: Sel, argument: Option<&AnyObject> )
pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet ) -> Retained<NSArray<ObjectType>>
Available on crate feature
NSIndexSet
only.pub unsafe fn objectAtIndexedSubscript( &self, idx: NSUInteger ) -> Retained<ObjectType>
pub unsafe fn enumerateObjectsUsingBlock( &self, block: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) + '_> )
Available on crate feature
block2
only.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.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.pub unsafe fn indexOfObjectPassingTest( &self, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> NSUInteger
Available on crate feature
block2
only.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.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.pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSIndexSet>
Available on crate features
NSIndexSet
and block2
only.pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSIndexSet>
Available on crate features
NSIndexSet
and NSObjCRuntime
and block2
only.pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSIndexSet>
Available on crate features
NSIndexSet
and NSObjCRuntime
and block2
only.pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator ) -> Retained<NSArray<ObjectType>>
Available on crate features
NSObjCRuntime
and block2
only.pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator ) -> Retained<NSArray<ObjectType>>
Available on crate features
NSObjCRuntime
and block2
only.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.pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( &self, other: &NSArray<ObjectType>, options: NSOrderedCollectionDifferenceCalculationOptions, block: &Block<dyn Fn(NonNull<ObjectType>, NonNull<ObjectType>) -> Bool + '_> ) -> Retained<NSOrderedCollectionDifference<ObjectType>>
Available on crate features
NSOrderedCollectionDifference
and block2
only.pub unsafe fn differenceFromArray_withOptions( &self, other: &NSArray<ObjectType>, options: NSOrderedCollectionDifferenceCalculationOptions ) -> Retained<NSOrderedCollectionDifference<ObjectType>>
Available on crate feature
NSOrderedCollectionDifference
only.pub unsafe fn differenceFromArray( &self, other: &NSArray<ObjectType> ) -> Retained<NSOrderedCollectionDifference<ObjectType>>
Available on crate feature
NSOrderedCollectionDifference
only.pub unsafe fn arrayByApplyingDifference( &self, difference: &NSOrderedCollectionDifference<ObjectType> ) -> Option<Retained<NSArray<ObjectType>>>
Available on crate feature
NSOrderedCollectionDifference
only.pub unsafe fn getObjects(&self, objects: NonNull<NonNull<ObjectType>>)
👎Deprecated: Use -getObjects:range: instead
pub unsafe fn writeToFile_atomically( &self, path: &NSString, use_auxiliary_file: bool ) -> bool
👎Deprecated
Available on crate feature
NSString
only.pub unsafe fn writeToURL_atomically( &self, url: &NSURL, atomically: bool ) -> bool
👎Deprecated
Available on crate feature
NSURL
only.pub unsafe fn valueForKey(&self, key: &NSString) -> Retained<AnyObject>
Available on crate features
NSKeyValueCoding
and NSString
only.pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString)
Available on crate features
NSKeyValueCoding
and NSString
only.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.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.pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( &self, observer: &NSObject, indexes: &NSIndexSet, key_path: &NSString )
Available on crate features
NSKeyValueObserving
and NSIndexSet
and NSString
only.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.pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, key_path: &NSString, context: *mut c_void )
Available on crate features
NSKeyValueObserving
and NSString
only.pub unsafe fn removeObserver_forKeyPath( &self, observer: &NSObject, key_path: &NSString )
Available on crate features
NSKeyValueObserving
and NSString
only.pub unsafe fn pathsMatchingExtensions( &self, filter_types: &NSArray<NSString> ) -> Retained<NSArray<NSString>>
Available on crate features
NSPathUtilities
and NSString
only.pub unsafe fn filteredArrayUsingPredicate( &self, predicate: &NSPredicate ) -> Retained<NSArray<ObjectType>>
Available on crate feature
NSPredicate
only.pub unsafe fn sortedArrayUsingDescriptors( &self, sort_descriptors: &NSArray<NSSortDescriptor> ) -> Retained<NSArray<ObjectType>>
Available on crate feature
NSSortDescriptor
only.Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
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());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
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.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
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<NSMutableArray<ObjectType>> for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> AsMut<NSMutableArray<ObjectType>> for NSMutableArray<ObjectType>
source§impl<ObjectType: ?Sized + Message> AsRef<NSMutableArray<ObjectType>> for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> AsRef<NSMutableArray<ObjectType>> for NSMutableArray<ObjectType>
source§impl<ObjectType: ?Sized + Message> Borrow<NSArray<ObjectType>> for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> Borrow<NSArray<ObjectType>> for NSMutableArray<ObjectType>
source§impl<ObjectType: ?Sized + Message> BorrowMut<AnyObject> for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> BorrowMut<AnyObject> for NSMutableArray<ObjectType>
source§fn borrow_mut(&mut self) -> &mut AnyObject
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>
impl<ObjectType: ?Sized + Message> BorrowMut<NSArray<ObjectType>> for NSMutableArray<ObjectType>
source§fn borrow_mut(&mut self) -> &mut NSArray<ObjectType>
fn borrow_mut(&mut self) -> &mut NSArray<ObjectType>
Mutably borrows from an owned value. Read more
source§impl<ObjectType: ?Sized + Message> BorrowMut<NSObject> for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> BorrowMut<NSObject> for NSMutableArray<ObjectType>
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl<ObjectType: ?Sized + Message> ClassType for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> ClassType for NSMutableArray<ObjectType>
§type Mutability = MutableWithImmutableSuperclass<NSArray<ObjectType>>
type Mutability = MutableWithImmutableSuperclass<NSArray<ObjectType>>
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSMutableArray"
const NAME: &'static str = "NSMutableArray"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl<T: Debug + Message> Debug for NSMutableArray<T>
Available on crate feature NSEnumerator
only.
impl<T: Debug + Message> Debug for NSMutableArray<T>
Available on crate feature
NSEnumerator
only.source§impl<ObjectType: Message> DefaultRetained for NSMutableArray<ObjectType>
impl<ObjectType: Message> DefaultRetained for NSMutableArray<ObjectType>
source§impl<'a, T: Message + IsRetainable> Extend<&'a T> for NSMutableArray<T>
impl<'a, T: Message + IsRetainable> Extend<&'a T> for NSMutableArray<T>
source§fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<T: Message> Extend<Retained<T>> for NSMutableArray<T>
impl<T: Message> Extend<Retained<T>> for NSMutableArray<T>
source§fn extend<I: IntoIterator<Item = Retained<T>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Retained<T>>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<'a, T: Message> IntoIterator for &'a NSMutableArray<T>
impl<'a, T: Message> IntoIterator for &'a NSMutableArray<T>
source§impl<'a, T: Message + IsMutable> IntoIterator for &'a mut NSMutableArray<T>
impl<'a, T: Message + IsMutable> IntoIterator for &'a mut NSMutableArray<T>
source§impl<ObjectType: PartialEq + ?Sized> PartialEq for NSMutableArray<ObjectType>
impl<ObjectType: PartialEq + ?Sized> PartialEq for NSMutableArray<ObjectType>
source§fn eq(&self, other: &NSMutableArray<ObjectType>) -> bool
fn eq(&self, other: &NSMutableArray<ObjectType>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<ObjectType: ?Sized + Message> RefEncode for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> RefEncode for NSMutableArray<ObjectType>
source§const ENCODING_REF: Encoding = <NSArray<ObjectType> as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSArray<ObjectType> as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
source§impl<'a, T: Message + IsRetainable + 'a> RetainedFromIterator<&'a T> for NSMutableArray<T>
impl<'a, T: Message + IsRetainable + 'a> RetainedFromIterator<&'a T> for NSMutableArray<T>
source§fn id_from_iter<I: IntoIterator<Item = &'a T>>(iter: I) -> Retained<Self>
fn id_from_iter<I: IntoIterator<Item = &'a T>>(iter: I) -> Retained<Self>
Creates an
Retained
from an iterator. Read moresource§fn retained_from_iter<I>(iter: I) -> Retained<Self>where
I: IntoIterator<Item = T>,
fn retained_from_iter<I>(iter: I) -> Retained<Self>where
I: IntoIterator<Item = T>,
Creates an
Retained
from an iterator.source§impl<T: Message> RetainedFromIterator<Retained<T>> for NSMutableArray<T>
impl<T: Message> RetainedFromIterator<Retained<T>> for NSMutableArray<T>
source§fn id_from_iter<I: IntoIterator<Item = Retained<T>>>(iter: I) -> Retained<Self>
fn id_from_iter<I: IntoIterator<Item = Retained<T>>>(iter: I) -> Retained<Self>
Creates an
Retained
from an iterator. Read moresource§fn retained_from_iter<I>(iter: I) -> Retained<Self>where
I: IntoIterator<Item = T>,
fn retained_from_iter<I>(iter: I) -> Retained<Self>where
I: IntoIterator<Item = T>,
Creates an
Retained
from an iterator.source§impl<T: Message> RetainedIntoIterator for NSMutableArray<T>
impl<T: Message> RetainedIntoIterator for NSMutableArray<T>
source§fn id_into_iter(this: Retained<Self>) -> Self::IntoIter
fn id_into_iter(this: Retained<Self>) -> Self::IntoIter
source§impl<T: Message + IsIdCloneable> ToOwned for NSMutableArray<T>
Available on crate feature NSObject
only.
impl<T: Message + IsIdCloneable> ToOwned for NSMutableArray<T>
Available on crate feature
NSObject
only.§type Owned = Retained<NSMutableArray<T>>
type Owned = Retained<NSMutableArray<T>>
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> Self::Owned
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)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<ObjectType: Eq + ?Sized> Eq for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + Message> Message for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + NSCoding> NSCoding for NSMutableArray<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSMutableArray<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized> NSFastEnumeration for NSMutableArray<ObjectType>
Available on crate feature
NSEnumerator
only.impl<ObjectType: ?Sized + IsIdCloneable> NSMutableCopying for NSMutableArray<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized> NSObjectProtocol for NSMutableArray<ObjectType>
impl<ObjectType: ?Sized + NSSecureCoding> NSSecureCoding for NSMutableArray<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized> StructuralPartialEq for NSMutableArray<ObjectType>
Auto Trait Implementations§
impl<ObjectType = AnyObject> !Freeze for NSMutableArray<ObjectType>
impl<ObjectType> RefUnwindSafe for NSMutableArray<ObjectType>where
ObjectType: RefUnwindSafe + ?Sized,
impl<ObjectType> Send for NSMutableArray<ObjectType>where
ObjectType: ClassType + Send + ?Sized,
<ObjectType as ClassType>::Mutability: SendSyncHelper<ObjectType>,
<<ObjectType as ClassType>::Mutability as SendSyncHelper<ObjectType>>::EquivalentType: Send,
impl<ObjectType> Sync for NSMutableArray<ObjectType>where
ObjectType: ClassType + Sync + ?Sized,
<ObjectType as ClassType>::Mutability: SendSyncHelper<ObjectType>,
<<ObjectType as ClassType>::Mutability as SendSyncHelper<ObjectType>>::EquivalentType: Sync,
impl<ObjectType = AnyObject> !Unpin for NSMutableArray<ObjectType>
impl<ObjectType> UnwindSafe for NSMutableArray<ObjectType>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more