pub trait NSArray: Sized {
// Required methods
unsafe fn init(self) -> id;
unsafe fn count(self) -> NSUInteger;
unsafe fn arrayByAddingObjectFromArray(self, object: id) -> id;
unsafe fn arrayByAddingObjectsFromArray(self, objects: id) -> id;
unsafe fn objectAtIndex(self, index: NSUInteger) -> id;
// Provided methods
unsafe fn array(_: Self) -> id { ... }
unsafe fn arrayWithObjects(_: Self, objects: &[id]) -> id { ... }
unsafe fn arrayWithObject(_: Self, object: id) -> id { ... }
}
๐Deprecated: use the objc2-foundation crate instead
Required Methodsยง
unsafe fn init(self) -> id
๐Deprecated: use the objc2-foundation crate instead
unsafe fn count(self) -> NSUInteger
๐Deprecated: use the objc2-foundation crate instead
unsafe fn arrayByAddingObjectFromArray(self, object: id) -> id
๐Deprecated: use the objc2-foundation crate instead
unsafe fn arrayByAddingObjectsFromArray(self, objects: id) -> id
๐Deprecated: use the objc2-foundation crate instead
unsafe fn objectAtIndex(self, index: NSUInteger) -> id
๐Deprecated: use the objc2-foundation crate instead
Provided Methodsยง
unsafe fn array(_: Self) -> id
๐Deprecated: use the objc2-foundation crate instead
unsafe fn arrayWithObjects(_: Self, objects: &[id]) -> id
๐Deprecated: use the objc2-foundation crate instead
unsafe fn arrayWithObject(_: Self, object: id) -> id
๐Deprecated: use the objc2-foundation crate instead
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.