Struct accesskit_macos::NSObject
source · #[repr(C)]pub struct NSObject { /* private fields */ }
Expand description
The root class of most Objective-C class hierarchies.
This represents the NSObject
class. The name “NSObject” also
refers to a protocol, see NSObjectProtocol
for that.
Since this class is only available with the Foundation
framework,
objc2
links to it for you.
This is exported under icrate::Foundation::NSObject
, you probably
want to use that path instead.
Implementations§
Methods from Deref<Target = AnyObject>§
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 AsMut<NSObject> for NSAccessibilityElement
impl AsMut<NSObject> for NSAccessibilityElement
source§impl<KeyType, ObjectType> AsMut<NSObject> for NSDictionary<KeyType, ObjectType>
impl<KeyType, ObjectType> AsMut<NSObject> for NSDictionary<KeyType, ObjectType>
source§impl AsMut<NSObject> for NSPersistentStoreResult
impl AsMut<NSObject> for NSPersistentStoreResult
source§impl AsMut<NSObject> for NSResponder
impl AsMut<NSObject> for NSResponder
source§impl AsRef<NSObject> for NSAccessibilityElement
impl AsRef<NSObject> for NSAccessibilityElement
source§impl<KeyType, ObjectType> AsRef<NSObject> for NSDictionary<KeyType, ObjectType>
impl<KeyType, ObjectType> AsRef<NSObject> for NSDictionary<KeyType, ObjectType>
source§impl AsRef<NSObject> for NSPersistentStoreResult
impl AsRef<NSObject> for NSPersistentStoreResult
source§impl AsRef<NSObject> for NSResponder
impl AsRef<NSObject> for NSResponder
source§impl Borrow<NSObject> for NSAccessibilityElement
impl Borrow<NSObject> for NSAccessibilityElement
source§impl<KeyType, ObjectType> Borrow<NSObject> for NSDictionary<KeyType, ObjectType>
impl<KeyType, ObjectType> Borrow<NSObject> for NSDictionary<KeyType, ObjectType>
source§impl Borrow<NSObject> for NSPersistentStoreResult
impl Borrow<NSObject> for NSPersistentStoreResult
source§impl Borrow<NSObject> for NSResponder
impl Borrow<NSObject> for NSResponder
source§impl BorrowMut<AnyObject> for NSObject
impl BorrowMut<AnyObject> for NSObject
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
source§impl BorrowMut<NSObject> for NSAccessibilityElement
impl BorrowMut<NSObject> for NSAccessibilityElement
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl<ObjectType> BorrowMut<NSObject> for NSArray<ObjectType>
impl<ObjectType> BorrowMut<NSObject> for NSArray<ObjectType>
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<NSObject> for NSControl
impl BorrowMut<NSObject> for NSControl
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl<KeyType, ObjectType> BorrowMut<NSObject> for NSDictionary<KeyType, ObjectType>
impl<KeyType, ObjectType> BorrowMut<NSObject> for NSDictionary<KeyType, ObjectType>
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<NSObject> for NSPersistentStoreAsynchronousResult
impl BorrowMut<NSObject> for NSPersistentStoreAsynchronousResult
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<NSObject> for NSPersistentStoreResult
impl BorrowMut<NSObject> for NSPersistentStoreResult
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<NSObject> for NSResponder
impl BorrowMut<NSObject> for NSResponder
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<NSObject> for NSValue
impl BorrowMut<NSObject> for NSValue
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<NSObject> for NSView
impl BorrowMut<NSObject> for NSView
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl ClassType for NSObject
impl ClassType for NSObject
§type Mutability = Root
type Mutability = Root
source§const NAME: &'static str = "NSObject"
const NAME: &'static str = "NSObject"
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
source§fn as_super(&self) -> &<NSObject as ClassType>::Super
fn as_super(&self) -> &<NSObject as ClassType>::Super
source§impl Hash for NSObject
impl Hash for NSObject
Hashing in Objective-C has the exact same requirement as in Rust:
If two objects are equal (as determined by the isEqual: method), they must have the same hash value.
See https://developer.apple.com/documentation/objectivec/1418956-nsobject/1418859-hash
source§impl NSObjectProtocol for NSObject
impl NSObjectProtocol for NSObject
source§impl PartialEq for NSObject
impl PartialEq for NSObject
Objective-C equality has approximately the same semantics as Rust equality (although less aptly specified).
At the very least, equality is expected to be symmetric and transitive, and that’s about the best we can do.
See also https://nshipster.com/equality/
source§impl RefEncode for NSObject
impl RefEncode for NSObject
source§const ENCODING_REF: Encoding = <AnyObject as crate::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <AnyObject as crate::RefEncode>::ENCODING_REF
impl Eq for NSObject
Most types’ equality is reflexive.
impl Message for NSObject
Auto Trait Implementations§
impl !RefUnwindSafe for NSObject
impl !Send for NSObject
impl !Sync for NSObject
impl !Unpin for NSObject
impl !UnwindSafe for NSObject
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
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
Self
if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
Self
if the type has no
mutable counterpart. Read more