Skip to main content

INSArray

Trait INSArray 

Source
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§

Source

fn m_contains_object(&self, object: T) -> bool

Returns a Boolean value that indicates whether a given object is present in the array.

§Arguments
  • object - An object to look for in the array..
§Returns

A Boolean value that indicates whether object is present in the array.

Source

fn p_count(&self) -> UInt

The number of objects in the array.

Source

fn p_first_object(&self) -> Option<T>
where T: PNSObject + FromId,

The first object in the array.

Source

fn p_last_object(&self) -> Option<T>
where T: PNSObject + FromId,

The last object in the array.

Source

fn m_object_at_index(&self, index: UInt) -> T
where T: PNSObject + FromId,

The object at the specified index.

Source

fn m_object_at_indexed_subscript(&self, index: UInt) -> Option<id>

The index of the specified object.

Source

fn m_index_of_object(&self, object: T) -> UInt

Returns the lowest index whose corresponding array value is equal to a given object.

Source

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 .

Source

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.

Source

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 .

Source

fn m_first_object_common_with_array(&self, other: &NSArray<T>) -> Option<T>
where T: PNSObject + FromId,

Returns the first object contained in the receiving array that’s equal to an object in another given array.

Source

fn m_is_equal_to_array(&self, other: &NSArray<T>) -> bool

Compares the receiving array to another array.

Source

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

Source

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

Source

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

Source

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.

Source

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".

Implementors§

Source§

impl<T> INSArray<T> for NSArray<T>

Source§

impl<T> INSArray<T> for NSMutableArray<T>
where T: PNSObject + FromId,