Struct objc2_foundation::NSObject
source · [−]#[repr(C)]pub struct NSObject { /* private fields */ }
Implementations
Methods from Deref<Target = Object>
sourcepub unsafe fn ivar<T>(&self, name: &str) -> &T where
T: Encode,
pub unsafe fn ivar<T>(&self, name: &str) -> &T where
T: Encode,
Returns a shared reference to the ivar with the given name.
Panics
Panics if the object has no ivar with the given name, or the type
encoding of the ivar differs from the type encoding of T
.
Safety
The caller must ensure that the ivar is actually of type T
.
Library implementors should expose a safe interface to the ivar.
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &T where
T: Encode,
👎 Deprecated: Use Object::ivar
instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &T where
T: Encode,
Use Object::ivar
instead.
sourcepub unsafe fn ivar_mut<T>(&mut self, name: &str) -> &mut T where
T: Encode,
pub unsafe fn ivar_mut<T>(&mut self, name: &str) -> &mut T where
T: Encode,
Returns a mutable reference to the ivar with the given name.
Panics
Panics if the object has no ivar with the given name, or the type
encoding of the ivar differs from the type encoding of T
.
Safety
The caller must ensure that the ivar is actually of type T
.
Library implementors should expose a safe interface to the ivar.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T where
T: Encode,
👎 Deprecated: Use Object::ivar_mut
instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T where
T: Encode,
Use Object::ivar_mut
instead.
sourcepub unsafe fn set_ivar<T>(&mut self, name: &str, value: T) where
T: Encode,
pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T) where
T: Encode,
Sets the value of the ivar with the given name.
Panics
Panics if the object has no ivar with the given name, or the type
encoding of the ivar differs from the type encoding of T
.
Safety
The caller must ensure that the ivar is actually of type T
.
Library implementors should expose a safe interface to the ivar.
Trait Implementations
sourceimpl<T, O: Ownership> AsMut<NSObject> for NSMutableArray<T, O>
impl<T, O: Ownership> AsMut<NSObject> for NSMutableArray<T, O>
sourceimpl AsMut<NSObject> for NSAttributedString
impl AsMut<NSObject> for NSAttributedString
sourceimpl AsMut<NSObject> for NSMutableData
impl AsMut<NSObject> for NSMutableData
sourceimpl<K, V> AsMut<NSObject> for NSDictionary<K, V>
impl<K, V> AsMut<NSObject> for NSDictionary<K, V>
sourceimpl AsMut<NSObject> for NSMutableAttributedString
impl AsMut<NSObject> for NSMutableAttributedString
sourceimpl AsMut<NSObject> for NSMutableString
impl AsMut<NSObject> for NSMutableString
sourceimpl AsMut<NSObject> for NSProcessInfo
impl AsMut<NSObject> for NSProcessInfo
sourceimpl<T, O: Ownership> AsRef<NSObject> for NSMutableArray<T, O>
impl<T, O: Ownership> AsRef<NSObject> for NSMutableArray<T, O>
sourceimpl AsRef<NSObject> for NSAttributedString
impl AsRef<NSObject> for NSAttributedString
sourceimpl AsRef<NSObject> for NSMutableData
impl AsRef<NSObject> for NSMutableData
sourceimpl<K, V> AsRef<NSObject> for NSDictionary<K, V>
impl<K, V> AsRef<NSObject> for NSDictionary<K, V>
sourceimpl AsRef<NSObject> for NSMutableAttributedString
impl AsRef<NSObject> for NSMutableAttributedString
sourceimpl AsRef<NSObject> for NSMutableString
impl AsRef<NSObject> for NSMutableString
sourceimpl AsRef<NSObject> for NSProcessInfo
impl AsRef<NSObject> for NSProcessInfo
sourceimpl<T, O: Ownership> Borrow<NSObject> for NSMutableArray<T, O>
impl<T, O: Ownership> Borrow<NSObject> for NSMutableArray<T, O>
sourceimpl Borrow<NSObject> for NSAttributedString
impl Borrow<NSObject> for NSAttributedString
sourceimpl Borrow<NSObject> for NSMutableData
impl Borrow<NSObject> for NSMutableData
sourceimpl<K, V> Borrow<NSObject> for NSDictionary<K, V>
impl<K, V> Borrow<NSObject> for NSDictionary<K, V>
sourceimpl Borrow<NSObject> for NSMutableAttributedString
impl Borrow<NSObject> for NSMutableAttributedString
sourceimpl Borrow<NSObject> for NSMutableString
impl Borrow<NSObject> for NSMutableString
sourceimpl Borrow<NSObject> for NSProcessInfo
impl Borrow<NSObject> for NSProcessInfo
sourceimpl<T, O: Ownership> BorrowMut<NSObject> for NSArray<T, O>
impl<T, O: Ownership> BorrowMut<NSObject> for NSArray<T, O>
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl<T, O: Ownership> BorrowMut<NSObject> for NSMutableArray<T, O>
impl<T, O: Ownership> BorrowMut<NSObject> for NSMutableArray<T, O>
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSThread
impl BorrowMut<NSObject> for NSThread
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSUUID
impl BorrowMut<NSObject> for NSUUID
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowMut<NSObject> for NSValue<T>
impl<T> BorrowMut<NSObject> for NSValue<T>
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSAttributedString
impl BorrowMut<NSObject> for NSAttributedString
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSData
impl BorrowMut<NSObject> for NSData
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSMutableData
impl BorrowMut<NSObject> for NSMutableData
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl<K, V> BorrowMut<NSObject> for NSDictionary<K, V>
impl<K, V> BorrowMut<NSObject> for NSDictionary<K, V>
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSMutableAttributedString
impl BorrowMut<NSObject> for NSMutableAttributedString
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSMutableString
impl BorrowMut<NSObject> for NSMutableString
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSProcessInfo
impl BorrowMut<NSObject> for NSProcessInfo
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<NSObject> for NSString
impl BorrowMut<NSObject> for NSString
sourcefn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
sourceimpl BorrowMut<Object> for NSObject
impl BorrowMut<Object> for NSObject
sourcefn borrow_mut(&mut self) -> &mut Object
fn borrow_mut(&mut self) -> &mut Object
Mutably borrows from an owned value. Read more
sourceimpl RefEncode for NSObject
impl RefEncode for NSObject
sourceconst ENCODING_REF: Encoding<'static> = ::objc2::Encoding::Object
const ENCODING_REF: Encoding<'static> = ::objc2::Encoding::Object
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSObject
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more