pub trait INSArray<T>: PNSObject {
Show 17 methods
// Provided methods
fn m_contains_object(&self, object: T) -> bool { ... }
fn p_count(&self) -> UInt { ... }
fn p_first_object(&self) -> Option<T>
where T: PNSObject + FromId { ... }
fn p_last_object(&self) -> Option<T>
where T: PNSObject + FromId { ... }
fn m_object_at_index(&self, index: UInt) -> T
where T: PNSObject + FromId { ... }
fn m_object_at_indexed_subscript(&self, index: UInt) -> Option<id> { ... }
fn m_index_of_object(&self, object: T) -> UInt { ... }
fn m_index_of_object_in_range(&self, object: T, range: NSRange) -> UInt { ... }
fn m_index_of_object_identical_to(&self, object: T) -> UInt { ... }
fn m_index_of_object_identical_to_in_range(
&self,
object: T,
range: NSRange,
) -> UInt { ... }
fn m_first_object_common_with_array(&self, other: &NSArray<T>) -> Option<T>
where T: PNSObject + FromId { ... }
fn m_is_equal_to_array(&self, other: &NSArray<T>) -> bool { ... }
unsafe fn m_array_by_adding_object(&self, object: T) -> NSArray<T> { ... }
unsafe fn m_array_by_adding_objects_from_array<A>(
&self,
objects: A,
) -> NSArray<T>
where A: INSArray<T> { ... }
unsafe fn m_subarray_with_range(&self, range: NSRange) -> NSArray<T> { ... }
fn m_description_with_locale(&self, locale: &NSLocale) -> NSString { ... }
fn m_description_with_locale_indent(
&self,
locale: &NSLocale,
indent: UInt,
) -> NSString { ... }
}
Expand description
A static ordered collection of objects.
Provided Methods§
Sourcefn m_contains_object(&self, object: T) -> bool
fn m_contains_object(&self, object: T) -> bool
Sourcefn p_first_object(&self) -> Option<T>
fn p_first_object(&self) -> Option<T>
The first object in the array.
Sourcefn p_last_object(&self) -> Option<T>
fn p_last_object(&self) -> Option<T>
The last object in the array.
Sourcefn m_object_at_index(&self, index: UInt) -> T
fn m_object_at_index(&self, index: UInt) -> T
The object at the specified index.
Sourcefn m_object_at_indexed_subscript(&self, index: UInt) -> Option<id>
fn m_object_at_indexed_subscript(&self, index: UInt) -> Option<id>
The index of the specified object.
Sourcefn m_index_of_object(&self, object: T) -> UInt
fn m_index_of_object(&self, object: T) -> UInt
Returns the lowest index whose corresponding array value is equal to a given object.
Sourcefn m_index_of_object_in_range(&self, object: T, range: NSRange) -> UInt
fn m_index_of_object_in_range(&self, object: T, range: NSRange) -> UInt
Returns the lowest index within a specified range whose corresponding array value is equal to a given object .
Sourcefn m_index_of_object_identical_to(&self, object: T) -> UInt
fn m_index_of_object_identical_to(&self, object: T) -> UInt
Returns the lowest index whose corresponding array value is identical to a given object.
Sourcefn m_index_of_object_identical_to_in_range(
&self,
object: T,
range: NSRange,
) -> UInt
fn m_index_of_object_identical_to_in_range( &self, object: T, range: NSRange, ) -> UInt
Returns the lowest index within a specified range whose corresponding array value is equal to a given object .
Sourcefn m_first_object_common_with_array(&self, other: &NSArray<T>) -> Option<T>
fn m_first_object_common_with_array(&self, other: &NSArray<T>) -> Option<T>
Returns the first object contained in the receiving array that’s equal to an object in another given array.
Sourcefn m_is_equal_to_array(&self, other: &NSArray<T>) -> bool
fn m_is_equal_to_array(&self, other: &NSArray<T>) -> bool
Compares the receiving array to another array.
Sourceunsafe fn m_array_by_adding_object(&self, object: T) -> NSArray<T>
unsafe fn m_array_by_adding_object(&self, object: T) -> NSArray<T>
Returns a new array that is a copy of the receiving array with a given object added to the end.
§Safety
This function dereferences a raw pointer
Sourceunsafe fn m_array_by_adding_objects_from_array<A>(
&self,
objects: A,
) -> NSArray<T>where
A: INSArray<T>,
unsafe fn m_array_by_adding_objects_from_array<A>(
&self,
objects: A,
) -> NSArray<T>where
A: INSArray<T>,
Returns a new array that is a copy of the receiving array with the objects contained in another array added to the end.
§Safety
This function dereferences a raw pointer
Sourceunsafe fn m_subarray_with_range(&self, range: NSRange) -> NSArray<T>
unsafe fn m_subarray_with_range(&self, range: NSRange) -> NSArray<T>
Returns a new array containing the receiving array’s elements that fall within the limits specified by a given range.
§Safety
This function dereferences a raw pointer
Sourcefn m_description_with_locale(&self, locale: &NSLocale) -> NSString
fn m_description_with_locale(&self, locale: &NSLocale) -> NSString
A string that represents the contents of the array, formatted as a property list. Returns a string that represents the contents of the array, formatted as a property list.
Sourcefn m_description_with_locale_indent(
&self,
locale: &NSLocale,
indent: UInt,
) -> NSString
fn m_description_with_locale_indent( &self, locale: &NSLocale, indent: UInt, ) -> NSString
Returns a string that represents the contents of the array, formatted as a property list.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.