Struct objc2_foundation::NSOrderedSet
source · #[repr(C)]pub struct NSOrderedSet<ObjectType: ?Sized = AnyObject> { /* private fields */ }
Available on crate feature
NSOrderedSet
only.Implementations§
source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
NSKeyValueCoding
pub unsafe fn valueForKey(&self, key: &NSString) -> Retained<AnyObject>
Available on crate features
NSKeyValueCoding
and NSString
only.pub unsafe fn setValue_forKey(&self, value: Option<&AnyObject>, key: &NSString)
Available on crate features
NSKeyValueCoding
and NSString
only.source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
NSKeyValueObserverRegistration
pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, key_path: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void )
Available on crate features
NSKeyValueObserving
and NSString
only.pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, key_path: &NSString, context: *mut c_void )
Available on crate features
NSKeyValueObserving
and NSString
only.pub unsafe fn removeObserver_forKeyPath( &self, observer: &NSObject, key_path: &NSString )
Available on crate features
NSKeyValueObserving
and NSString
only.source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
pub unsafe fn count(&self) -> NSUInteger
pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Retained<ObjectType>
pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>
pub unsafe fn initWithObjects_count( this: Allocated<Self>, objects: *mut NonNull<ObjectType>, cnt: NSUInteger ) -> Retained<Self>
pub unsafe fn initWithCoder( this: Allocated<Self>, coder: &NSCoder ) -> Option<Retained<Self>>
Available on crate feature
NSCoder
only.source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
Methods declared on superclass NSObject
source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
NSExtendedOrderedSet
pub unsafe fn getObjects_range( &self, objects: *mut NonNull<ObjectType>, range: NSRange )
Available on crate feature
NSRange
only.pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet ) -> Retained<NSArray<ObjectType>>
Available on crate features
NSArray
and NSIndexSet
only.pub unsafe fn firstObject(&self) -> Option<Retained<ObjectType>>
pub unsafe fn lastObject(&self) -> Option<Retained<ObjectType>>
pub unsafe fn isEqualToOrderedSet( &self, other: &NSOrderedSet<ObjectType> ) -> bool
pub unsafe fn containsObject(&self, object: &ObjectType) -> bool
pub unsafe fn intersectsOrderedSet( &self, other: &NSOrderedSet<ObjectType> ) -> bool
pub unsafe fn intersectsSet(&self, set: &NSSet<ObjectType>) -> bool
Available on crate feature
NSSet
only.pub unsafe fn isSubsetOfOrderedSet( &self, other: &NSOrderedSet<ObjectType> ) -> bool
pub unsafe fn isSubsetOfSet(&self, set: &NSSet<ObjectType>) -> bool
Available on crate feature
NSSet
only.pub unsafe fn objectAtIndexedSubscript( &self, idx: NSUInteger ) -> Retained<ObjectType>
pub unsafe fn objectEnumerator(&self) -> Retained<NSEnumerator<ObjectType>>
Available on crate feature
NSEnumerator
only.pub unsafe fn reverseObjectEnumerator( &self ) -> Retained<NSEnumerator<ObjectType>>
Available on crate feature
NSEnumerator
only.pub unsafe fn reversedOrderedSet(&self) -> Retained<NSOrderedSet<ObjectType>>
pub unsafe fn array(&self) -> Retained<NSArray<ObjectType>>
Available on crate feature
NSArray
only.pub unsafe fn set(&self) -> Retained<NSSet<ObjectType>>
Available on crate feature
NSSet
only.pub unsafe fn enumerateObjectsUsingBlock( &self, block: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) + '_> )
Available on crate feature
block2
only.pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) + '_> )
Available on crate features
NSObjCRuntime
and block2
only.pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, s: &NSIndexSet, opts: NSEnumerationOptions, block: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) + '_> )
Available on crate features
NSIndexSet
and NSObjCRuntime
and block2
only.pub unsafe fn indexOfObjectPassingTest( &self, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> NSUInteger
Available on crate feature
block2
only.pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> NSUInteger
Available on crate features
NSObjCRuntime
and block2
only.pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> NSUInteger
Available on crate features
NSIndexSet
and NSObjCRuntime
and block2
only.pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSIndexSet>
Available on crate features
NSIndexSet
and block2
only.pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSIndexSet>
Available on crate features
NSIndexSet
and NSObjCRuntime
and block2
only.pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: &Block<dyn Fn(NonNull<ObjectType>, NSUInteger, NonNull<Bool>) -> Bool + '_> ) -> Retained<NSIndexSet>
Available on crate features
NSIndexSet
and NSObjCRuntime
and block2
only.pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, object: &ObjectType, range: NSRange, opts: NSBinarySearchingOptions, cmp: NSComparator ) -> NSUInteger
Available on crate features
NSArray
and NSObjCRuntime
and NSRange
and block2
only.pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator ) -> Retained<NSArray<ObjectType>>
Available on crate features
NSArray
and NSObjCRuntime
and block2
only.pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator ) -> Retained<NSArray<ObjectType>>
Available on crate features
NSArray
and NSObjCRuntime
and block2
only.pub unsafe fn description(&self) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn descriptionWithLocale( &self, locale: Option<&AnyObject> ) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&AnyObject>, level: NSUInteger ) -> Retained<NSString>
Available on crate feature
NSString
only.source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
NSOrderedSetCreation
pub unsafe fn orderedSet() -> Retained<Self>
pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Retained<Self>
pub unsafe fn orderedSetWithObjects_count( objects: NonNull<NonNull<ObjectType>>, cnt: NSUInteger ) -> Retained<Self>
pub unsafe fn orderedSetWithOrderedSet( set: &NSOrderedSet<ObjectType> ) -> Retained<Self>
pub unsafe fn orderedSetWithOrderedSet_range_copyItems( set: &NSOrderedSet<ObjectType>, range: NSRange, flag: bool ) -> Retained<Self>
Available on crate feature
NSRange
only.pub unsafe fn orderedSetWithArray(array: &NSArray<ObjectType>) -> Retained<Self>
Available on crate feature
NSArray
only.pub unsafe fn orderedSetWithArray_range_copyItems( array: &NSArray<ObjectType>, range: NSRange, flag: bool ) -> Retained<Self>
Available on crate features
NSArray
and NSRange
only.pub unsafe fn orderedSetWithSet(set: &NSSet<ObjectType>) -> Retained<Self>
Available on crate feature
NSSet
only.pub unsafe fn orderedSetWithSet_copyItems( set: &NSSet<ObjectType>, flag: bool ) -> Retained<Self>
Available on crate feature
NSSet
only.pub unsafe fn initWithObject( this: Allocated<Self>, object: &ObjectType ) -> Retained<Self>
pub unsafe fn initWithOrderedSet( this: Allocated<Self>, set: &NSOrderedSet<ObjectType> ) -> Retained<Self>
pub unsafe fn initWithOrderedSet_copyItems( this: Allocated<Self>, set: &NSOrderedSet<ObjectType>, flag: bool ) -> Retained<Self>
pub unsafe fn initWithOrderedSet_range_copyItems( this: Allocated<Self>, set: &NSOrderedSet<ObjectType>, range: NSRange, flag: bool ) -> Retained<Self>
Available on crate feature
NSRange
only.pub unsafe fn initWithArray( this: Allocated<Self>, array: &NSArray<ObjectType> ) -> Retained<Self>
Available on crate feature
NSArray
only.pub unsafe fn initWithArray_copyItems( this: Allocated<Self>, set: &NSArray<ObjectType>, flag: bool ) -> Retained<Self>
Available on crate feature
NSArray
only.pub unsafe fn initWithArray_range_copyItems( this: Allocated<Self>, set: &NSArray<ObjectType>, range: NSRange, flag: bool ) -> Retained<Self>
Available on crate features
NSArray
and NSRange
only.pub unsafe fn initWithSet( this: Allocated<Self>, set: &NSSet<ObjectType> ) -> Retained<Self>
Available on crate feature
NSSet
only.pub unsafe fn initWithSet_copyItems( this: Allocated<Self>, set: &NSSet<ObjectType>, flag: bool ) -> Retained<Self>
Available on crate feature
NSSet
only.source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
NSOrderedSetDiffing
pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( &self, other: &NSOrderedSet<ObjectType>, options: NSOrderedCollectionDifferenceCalculationOptions, block: &Block<dyn Fn(NonNull<ObjectType>, NonNull<ObjectType>) -> Bool + '_> ) -> Retained<NSOrderedCollectionDifference<ObjectType>>
Available on crate features
NSOrderedCollectionDifference
and block2
only.pub unsafe fn differenceFromOrderedSet_withOptions( &self, other: &NSOrderedSet<ObjectType>, options: NSOrderedCollectionDifferenceCalculationOptions ) -> Retained<NSOrderedCollectionDifference<ObjectType>>
Available on crate feature
NSOrderedCollectionDifference
only.pub unsafe fn differenceFromOrderedSet( &self, other: &NSOrderedSet<ObjectType> ) -> Retained<NSOrderedCollectionDifference<ObjectType>>
Available on crate feature
NSOrderedCollectionDifference
only.pub unsafe fn orderedSetByApplyingDifference( &self, difference: &NSOrderedCollectionDifference<ObjectType> ) -> Option<Retained<NSOrderedSet<ObjectType>>>
Available on crate feature
NSOrderedCollectionDifference
only.source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
NSPredicateSupport
pub unsafe fn filteredOrderedSetUsingPredicate( &self, p: &NSPredicate ) -> Retained<NSOrderedSet<ObjectType>>
Available on crate feature
NSPredicate
only.source§impl<ObjectType: Message> NSOrderedSet<ObjectType>
impl<ObjectType: Message> NSOrderedSet<ObjectType>
NSKeyValueSorting
pub unsafe fn sortedArrayUsingDescriptors( &self, sort_descriptors: &NSArray<NSSortDescriptor> ) -> Retained<NSArray<ObjectType>>
Available on crate features
NSSortDescriptor
and NSArray
only.Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Trait Implementations§
source§impl<ObjectType: ?Sized + Message> AsMut<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> AsMut<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
source§fn as_mut(&mut self) -> &mut NSOrderedSet<ObjectType>
fn as_mut(&mut self) -> &mut NSOrderedSet<ObjectType>
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<ObjectType: ?Sized + Message> AsMut<NSOrderedSet<ObjectType>> for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> AsMut<NSOrderedSet<ObjectType>> for NSOrderedSet<ObjectType>
source§impl<ObjectType: ?Sized + Message> AsRef<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> AsRef<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
source§fn as_ref(&self) -> &NSOrderedSet<ObjectType>
fn as_ref(&self) -> &NSOrderedSet<ObjectType>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<ObjectType: ?Sized + Message> AsRef<NSOrderedSet<ObjectType>> for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> AsRef<NSOrderedSet<ObjectType>> for NSOrderedSet<ObjectType>
source§impl<ObjectType: ?Sized + Message> Borrow<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> Borrow<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
source§fn borrow(&self) -> &NSOrderedSet<ObjectType>
fn borrow(&self) -> &NSOrderedSet<ObjectType>
Immutably borrows from an owned value. Read more
source§impl<ObjectType: ?Sized + Message> BorrowMut<AnyObject> for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> BorrowMut<AnyObject> for NSOrderedSet<ObjectType>
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl<ObjectType: ?Sized + Message> BorrowMut<NSObject> for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> BorrowMut<NSObject> for NSOrderedSet<ObjectType>
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl<ObjectType: ?Sized + Message> BorrowMut<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> BorrowMut<NSOrderedSet<ObjectType>> for NSMutableOrderedSet<ObjectType>
source§fn borrow_mut(&mut self) -> &mut NSOrderedSet<ObjectType>
fn borrow_mut(&mut self) -> &mut NSOrderedSet<ObjectType>
Mutably borrows from an owned value. Read more
source§impl<ObjectType: ?Sized + Message> ClassType for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> ClassType for NSOrderedSet<ObjectType>
§type Mutability = ImmutableWithMutableSubclass<NSMutableOrderedSet<ObjectType>>
type Mutability = ImmutableWithMutableSubclass<NSMutableOrderedSet<ObjectType>>
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSOrderedSet"
const NAME: &'static str = "NSOrderedSet"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl<ObjectType: PartialEq + ?Sized> PartialEq for NSOrderedSet<ObjectType>
impl<ObjectType: PartialEq + ?Sized> PartialEq for NSOrderedSet<ObjectType>
source§fn eq(&self, other: &NSOrderedSet<ObjectType>) -> bool
fn eq(&self, other: &NSOrderedSet<ObjectType>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<ObjectType: ?Sized + Message> RefEncode for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> RefEncode for NSOrderedSet<ObjectType>
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl<ObjectType: Eq + ?Sized> Eq for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + Message> Message for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + NSCoding> NSCoding for NSOrderedSet<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized + IsIdCloneable> NSCopying for NSOrderedSet<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized> NSFastEnumeration for NSOrderedSet<ObjectType>
Available on crate feature
NSEnumerator
only.impl<ObjectType: ?Sized + IsIdCloneable> NSMutableCopying for NSOrderedSet<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized> NSObjectProtocol for NSOrderedSet<ObjectType>
impl<ObjectType: ?Sized + NSSecureCoding> NSSecureCoding for NSOrderedSet<ObjectType>
Available on crate feature
NSObject
only.impl<ObjectType: ?Sized> StructuralPartialEq for NSOrderedSet<ObjectType>
Auto Trait Implementations§
impl<ObjectType = AnyObject> !Freeze for NSOrderedSet<ObjectType>
impl<ObjectType> RefUnwindSafe for NSOrderedSet<ObjectType>where
ObjectType: RefUnwindSafe + ?Sized,
impl<ObjectType> Send for NSOrderedSet<ObjectType>where
ObjectType: ClassType + Send + ?Sized,
<ObjectType as ClassType>::Mutability: SendSyncHelper<ObjectType>,
<<ObjectType as ClassType>::Mutability as SendSyncHelper<ObjectType>>::EquivalentType: Send,
impl<ObjectType> Sync for NSOrderedSet<ObjectType>where
ObjectType: ClassType + Sync + ?Sized,
<ObjectType as ClassType>::Mutability: SendSyncHelper<ObjectType>,
<<ObjectType as ClassType>::Mutability as SendSyncHelper<ObjectType>>::EquivalentType: Sync,
impl<ObjectType = AnyObject> !Unpin for NSOrderedSet<ObjectType>
impl<ObjectType> UnwindSafe for NSOrderedSet<ObjectType>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more