Struct objc2_foundation::NSArray[][src]

#[repr(C)]
pub struct NSArray<T, O: Ownership> { /* fields omitted */ }
Expand description

TODO

You can have a Id<NSArray<T, Owned>, Owned>, which allows mutable access to the elements (without modifying the array itself), and Id<NSArray<T, Shared>, Shared> which allows sharing the array.

Id<NSArray<T, Owned>, Shared> is possible, but pretty useless. TODO: Can we make it impossible? Should we?

What about Id<NSArray<T, Shared>, Owned>?

Trait Implementations

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The NSArray itself (length and number of items) is always immutable, but we would like to know when we’re the only owner of the array, to allow mutation of the array’s items.

We only implement INSCopying when O = Shared, so this is safe.

Indicates whether the type is mutable or immutable. Read more

The output type. Read more

TODO

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The Objective-C type-encoding for a reference of this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.