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

Implementations§

source§

impl<T: Message> NSMutableArray<T>

source

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

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source

pub fn into_vec(array: Id<Self>) -> Vec<Id<T>>

Available on crate feature Foundation_NSMutableArray only.
source§

impl<T: Message> NSMutableArray<T>

source

pub fn push(&mut self, obj: Id<T>)

Available on crate feature Foundation_NSMutableArray only.
source

pub fn insert(&mut self, index: usize, obj: Id<T>)

Available on crate feature Foundation_NSMutableArray only.
source

pub fn replace(&mut self, index: usize, obj: Id<T>) -> Result<Id<T>, Id<T>>

Available on crate feature Foundation_NSMutableArray only.
source

pub fn remove(&mut self, index: usize) -> Option<Id<T>>

Available on crate feature Foundation_NSMutableArray only.
source

pub fn pop(&mut self) -> Option<Id<T>>

Available on crate feature Foundation_NSMutableArray only.
source

pub fn sort_by<F: FnMut(&T, &T) -> Ordering>(&mut self, compare: F)

Available on crate feature Foundation_NSMutableArray only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

Methods declared on superclass NSArray

NSArrayCreation

source

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

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

source

pub unsafe fn addObject(&mut self, an_object: &ObjectType)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn insertObject_atIndex( &mut self, an_object: &ObjectType, index: NSUInteger )

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeLastObject(&mut self)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObjectAtIndex(&mut self, index: NSUInteger)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn replaceObjectAtIndex_withObject( &mut self, index: NSUInteger, an_object: &ObjectType )

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn initWithCapacity( this: Option<Allocated<Self>>, num_items: NSUInteger ) -> Id<Self>

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate features Foundation_NSMutableArray and Foundation_NSCoder only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

Methods declared on superclass NSArray

source

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

Available on crate feature Foundation_NSMutableArray only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

Methods declared on superclass NSObject

source

pub fn new() -> Id<Self>

Available on crate feature Foundation_NSMutableArray only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

NSExtendedMutableArray

source

pub unsafe fn addObjectsFromArray(&mut self, other_array: &NSArray<ObjectType>)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &mut self, idx1: NSUInteger, idx2: NSUInteger )

Available on crate feature Foundation_NSMutableArray only.
source

pub fn removeAllObjects(&mut self)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObject_inRange( &mut self, an_object: &ObjectType, range: NSRange )

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObject(&mut self, an_object: &ObjectType)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObjectIdenticalTo_inRange( &mut self, an_object: &ObjectType, range: NSRange )

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObjectIdenticalTo(&mut self, an_object: &ObjectType)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObjectsFromIndices_numIndices( &mut self, indices: NonNull<NSUInteger>, cnt: NSUInteger )

👎Deprecated: Not supported
Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObjectsInArray(&mut self, other_array: &NSArray<ObjectType>)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn removeObjectsInRange(&mut self, range: NSRange)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( &mut self, range: NSRange, other_array: &NSArray<ObjectType>, other_range: NSRange )

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn replaceObjectsInRange_withObjectsFromArray( &mut self, range: NSRange, other_array: &NSArray<ObjectType> )

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn setArray(&mut self, other_array: &NSArray<ObjectType>)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn sortUsingFunction_context( &mut self, compare: unsafe extern "C" fn(_: NonNull<ObjectType>, _: NonNull<ObjectType>, _: *mut c_void) -> NSInteger, context: *mut c_void )

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn sortUsingSelector(&mut self, comparator: Sel)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn insertObjects_atIndexes( &mut self, objects: &NSArray<ObjectType>, indexes: &NSIndexSet )

Available on crate features Foundation_NSMutableArray and Foundation_NSIndexSet only.
source

pub unsafe fn removeObjectsAtIndexes(&mut self, indexes: &NSIndexSet)

Available on crate features Foundation_NSMutableArray and Foundation_NSIndexSet only.
source

pub unsafe fn replaceObjectsAtIndexes_withObjects( &mut self, indexes: &NSIndexSet, objects: &NSArray<ObjectType> )

Available on crate features Foundation_NSMutableArray and Foundation_NSIndexSet only.
source

pub unsafe fn setObject_atIndexedSubscript( &mut self, obj: &ObjectType, idx: NSUInteger )

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn sortUsingComparator(&mut self, cmptr: NSComparator)

Available on crate feature Foundation_NSMutableArray only.
source

pub unsafe fn sortWithOptions_usingComparator( &mut self, opts: NSSortOptions, cmptr: NSComparator )

Available on crate feature Foundation_NSMutableArray only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

NSMutableArrayCreation

source

pub unsafe fn arrayWithCapacity(num_items: NSUInteger) -> Id<Self>

Available on crate feature Foundation_NSMutableArray only.
source

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

Available on crate features Foundation_NSMutableArray and Foundation_NSString only.
source

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

Available on crate features Foundation_NSMutableArray and Foundation_NSURL only.
source

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

Available on crate features Foundation_NSMutableArray and Foundation_NSString only.
source

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

Available on crate features Foundation_NSMutableArray and Foundation_NSURL only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

NSMutableArrayDiffing

source

pub unsafe fn applyDifference( &mut self, difference: &NSOrderedCollectionDifference<ObjectType> )

Available on crate features Foundation_NSMutableArray and Foundation_NSOrderedCollectionDifference only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

NSPredicateSupport

source

pub unsafe fn filterUsingPredicate(&mut self, predicate: &NSPredicate)

Available on crate features Foundation_NSMutableArray and Foundation_NSPredicate only.
source§

impl<ObjectType: Message> NSMutableArray<ObjectType>

NSSortDescriptorSorting

source

pub unsafe fn sortUsingDescriptors( &mut self, sort_descriptors: &NSArray<NSSortDescriptor> )

Available on crate features Foundation_NSMutableArray and Foundation_NSSortDescriptor only.

Methods from Deref<Target = NSArray<ObjectType>>§

source

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

source

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

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

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

pub fn objects_in_range(&self, range: Range<usize>) -> Option<Vec<&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

pub fn count(&self) -> NSUInteger

source

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

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

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

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

👎Deprecated: Use -getObjects:range: instead
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

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

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

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

Available on crate feature Foundation_NSString only.
source

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

Available on crate feature Foundation_NSPredicate only.
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 NSMutableArray<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 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<NSMutableArray<ObjectType>> for NSMutableArray<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<NSObject> for NSMutableArray<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 NSMutableArray<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 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<NSMutableArray<ObjectType>> for NSMutableArray<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<NSObject> for NSMutableArray<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 NSMutableArray<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 NSMutableArray<ObjectType>

source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
source§

impl<ObjectType: Message> BorrowMut<AnyObject> for NSMutableArray<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 NSMutableArray<ObjectType>

source§

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

Mutably borrows from an owned value. Read more
source§

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

§

type Super = NSArray<ObjectType>

The superclass of this class. Read more
§

type Mutability = MutableWithImmutableSuperclass<NSArray<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 NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
source§

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

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

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

Available on crate feature Foundation_NSMutableArray only.
source§

fn default_id() -> Id<Self>

The default Id for a type. Read more
source§

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

§

type Target = NSArray<ObjectType>

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

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

source§

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

Mutably dereferences the value.
source§

impl<'a, T: IsRetainable> Extend<&'a T> for NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

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<Id<T>> for NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
source§

fn extend<I: IntoIterator<Item = Id<T>>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

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)

🔬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<ObjectType: Hash + Message> Hash for NSMutableArray<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 NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
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 NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
source§

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

Creates an Id from an iterator.
source§

impl<T: Message> IdIntoIterator for NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
§

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 NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
§

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 NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
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 NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
§

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 NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
§

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 NSMutableArray<ObjectType>

Available on crate feature Foundation_NSMutableArray only.
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 NSMutableArray<ObjectType>

Available on crate feature Foundation_NSMutableArray only.
source§

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

Available on crate feature Foundation_NSMutableArray only.
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 NSMutableArray<ObjectType>

Available on crate feature Foundation_NSMutableArray only.
source§

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

source§

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

source§

fn eq(&self, other: &NSMutableArray<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 NSMutableArray<ObjectType>

source§

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<T: IsIdCloneable> ToOwned for NSMutableArray<T>

Available on crate feature Foundation_NSMutableArray only.
§

type Owned = Id<NSMutableArray<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 + Message> Eq for NSMutableArray<ObjectType>

source§

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

source§

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

Available on crate feature Foundation_NSMutableArray only.
source§

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

Available on crate feature Foundation_NSMutableArray only.
source§

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

source§

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

Auto Trait Implementations§

§

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

§

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

§

impl<ObjectType> Sync for NSMutableArray<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 NSMutableArray<ObjectType>

§

impl<ObjectType> UnwindSafe for NSMutableArray<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,