Struct objc2_foundation::NSPortCoder
source · #[repr(C)]pub struct NSPortCoder { /* private fields */ }
👎Deprecated: Use NSXPCConnection instead
Available on crate features
NSCoder
and NSPortCoder
only.Implementations§
source§impl NSPortCoder
impl NSPortCoder
pub unsafe fn isBycopy(&self) -> bool
👎Deprecated: Use NSXPCConnection instead
pub unsafe fn isByref(&self) -> bool
👎Deprecated: Use NSXPCConnection instead
pub unsafe fn encodePortObject(&self, aport: &NSPort)
👎Deprecated: Use NSXPCConnection instead
Available on crate feature
NSPort
only.pub unsafe fn decodePortObject(&self) -> Option<Retained<NSPort>>
👎Deprecated: Use NSXPCConnection instead
Available on crate feature
NSPort
only.pub unsafe fn connection(&self) -> Option<Retained<NSConnection>>
👎Deprecated
Available on crate feature
NSConnection
only.pub unsafe fn portCoderWithReceivePort_sendPort_components( rcv_port: Option<&NSPort>, snd_port: Option<&NSPort>, comps: Option<&NSArray> ) -> Retained<AnyObject>
👎Deprecated
Available on crate features
NSArray
and NSPort
only.pub unsafe fn initWithReceivePort_sendPort_components( this: Allocated<Self>, rcv_port: Option<&NSPort>, snd_port: Option<&NSPort>, comps: Option<&NSArray> ) -> Retained<Self>
👎Deprecated
Available on crate features
NSArray
and NSPort
only.pub unsafe fn dispatch(&self)
👎Deprecated
Methods from Deref<Target = NSCoder>§
pub unsafe fn encodeValueOfObjCType_at( &self, type: NonNull<c_char>, addr: NonNull<c_void> )
pub unsafe fn encodeDataObject(&self, data: &NSData)
Available on crate feature
NSData
only.pub unsafe fn decodeDataObject(&self) -> Option<Retained<NSData>>
Available on crate feature
NSData
only.pub unsafe fn decodeValueOfObjCType_at_size( &self, type: NonNull<c_char>, data: NonNull<c_void>, size: NSUInteger )
pub unsafe fn versionForClassName(&self, class_name: &NSString) -> NSInteger
Available on crate feature
NSString
only.pub unsafe fn encodeObject(&self, object: Option<&AnyObject>)
pub unsafe fn encodeRootObject(&self, root_object: &AnyObject)
pub unsafe fn encodeBycopyObject(&self, an_object: Option<&AnyObject>)
pub unsafe fn encodeByrefObject(&self, an_object: Option<&AnyObject>)
pub unsafe fn encodeConditionalObject(&self, object: Option<&AnyObject>)
pub unsafe fn encodeArrayOfObjCType_count_at( &self, type: NonNull<c_char>, count: NSUInteger, array: NonNull<c_void> )
pub unsafe fn encodeBytes_length( &self, byteaddr: *mut c_void, length: NSUInteger )
pub unsafe fn decodeObject(&self) -> Option<Retained<AnyObject>>
pub unsafe fn decodeTopLevelObjectAndReturnError( &self ) -> Result<Retained<AnyObject>, Retained<NSError>>
Available on crate feature
NSError
only.pub unsafe fn decodeArrayOfObjCType_count_at( &self, item_type: NonNull<c_char>, count: NSUInteger, array: NonNull<c_void> )
pub unsafe fn decodeBytesWithReturnedLength( &self, lengthp: NonNull<NSUInteger> ) -> *mut c_void
pub unsafe fn encodePropertyList(&self, a_property_list: &AnyObject)
pub unsafe fn decodePropertyList(&self) -> Option<Retained<AnyObject>>
pub unsafe fn setObjectZone(&self, zone: *mut NSZone)
Available on crate feature
NSZone
only.pub unsafe fn objectZone(&self) -> *mut NSZone
Available on crate feature
NSZone
only.pub unsafe fn systemVersion(&self) -> c_uint
pub unsafe fn allowsKeyedCoding(&self) -> bool
pub unsafe fn encodeObject_forKey( &self, object: Option<&AnyObject>, key: &NSString )
Available on crate feature
NSString
only.pub unsafe fn encodeConditionalObject_forKey( &self, object: Option<&AnyObject>, key: &NSString )
Available on crate feature
NSString
only.pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString)
Available on crate feature
NSString
only.pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString)
Available on crate feature
NSString
only.pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString)
Available on crate feature
NSString
only.pub unsafe fn encodeInt64_forKey(&self, value: i64, key: &NSString)
Available on crate feature
NSString
only.pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString)
Available on crate feature
NSString
only.pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString)
Available on crate feature
NSString
only.pub unsafe fn encodeBytes_length_forKey( &self, bytes: *mut u8, length: NSUInteger, key: &NSString )
Available on crate feature
NSString
only.pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool
Available on crate feature
NSString
only.pub unsafe fn decodeObjectForKey( &self, key: &NSString ) -> Option<Retained<AnyObject>>
Available on crate feature
NSString
only.pub unsafe fn decodeTopLevelObjectForKey_error( &self, key: &NSString ) -> Result<Retained<AnyObject>, Retained<NSError>>
Available on crate features
NSError
and NSString
only.pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool
Available on crate feature
NSString
only.pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int
Available on crate feature
NSString
only.pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32
Available on crate feature
NSString
only.pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> i64
Available on crate feature
NSString
only.pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float
Available on crate feature
NSString
only.pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double
Available on crate feature
NSString
only.pub unsafe fn decodeBytesForKey_returnedLength( &self, key: &NSString, lengthp: *mut NSUInteger ) -> *mut u8
Available on crate feature
NSString
only.pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString)
Available on crate feature
NSString
only.pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger
Available on crate feature
NSString
only.pub unsafe fn requiresSecureCoding(&self) -> bool
pub unsafe fn decodeObjectOfClass_forKey( &self, a_class: &AnyClass, key: &NSString ) -> Option<Retained<AnyObject>>
Available on crate feature
NSString
only.pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( &self, a_class: &AnyClass, key: &NSString ) -> Result<Retained<AnyObject>, Retained<NSError>>
Available on crate features
NSError
and NSString
only.pub unsafe fn decodeArrayOfObjectsOfClass_forKey( &self, cls: &AnyClass, key: &NSString ) -> Option<Retained<NSArray>>
Available on crate features
NSArray
and NSString
only.pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( &self, key_cls: &AnyClass, object_cls: &AnyClass, key: &NSString ) -> Option<Retained<NSDictionary>>
Available on crate features
NSDictionary
and NSString
only.pub unsafe fn decodeObjectOfClasses_forKey( &self, classes: Option<&NSSet<TodoClass>>, key: &NSString ) -> Option<Retained<AnyObject>>
Available on crate features
NSSet
and NSString
only.pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( &self, classes: Option<&NSSet<TodoClass>>, key: &NSString ) -> Result<Retained<AnyObject>, Retained<NSError>>
Available on crate features
NSError
and NSSet
and NSString
only.pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( &self, classes: &NSSet<TodoClass>, key: &NSString ) -> Option<Retained<NSArray>>
Available on crate features
NSArray
and NSSet
and NSString
only.pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( &self, key_classes: &NSSet<TodoClass>, object_classes: &NSSet<TodoClass>, key: &NSString ) -> Option<Retained<NSDictionary>>
Available on crate features
NSDictionary
and NSSet
and NSString
only.pub unsafe fn decodePropertyListForKey( &self, key: &NSString ) -> Option<Retained<AnyObject>>
Available on crate feature
NSString
only.pub unsafe fn allowedClasses(&self) -> Option<Retained<NSSet<TodoClass>>>
Available on crate feature
NSSet
only.pub unsafe fn failWithError(&self, error: &NSError)
Available on crate feature
NSError
only.pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy
pub unsafe fn error(&self) -> Option<Retained<NSError>>
Available on crate feature
NSError
only.pub unsafe fn encodeNXObject(&self, object: &AnyObject)
👎Deprecated: Not supported
pub unsafe fn decodeNXObject(&self) -> Option<Retained<AnyObject>>
👎Deprecated: Not supported
pub unsafe fn decodeValueOfObjCType_at( &self, type: NonNull<c_char>, data: NonNull<c_void> )
👎Deprecated
pub unsafe fn encodePoint(&self, point: NSPoint)
Available on crate feature
NSGeometry
only.pub unsafe fn decodePoint(&self) -> NSPoint
Available on crate feature
NSGeometry
only.pub unsafe fn encodeSize(&self, size: NSSize)
Available on crate feature
NSGeometry
only.pub unsafe fn decodeSize(&self) -> NSSize
Available on crate feature
NSGeometry
only.pub unsafe fn encodeRect(&self, rect: NSRect)
Available on crate feature
NSGeometry
only.pub unsafe fn decodeRect(&self) -> NSRect
Available on crate feature
NSGeometry
only.pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString)
Available on crate features
NSGeometry
and NSString
only.pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString)
Available on crate features
NSGeometry
and NSString
only.pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString)
Available on crate features
NSGeometry
and NSString
only.pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint
Available on crate features
NSGeometry
and NSString
only.pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize
Available on crate features
NSGeometry
and NSString
only.pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect
Available on crate features
NSGeometry
and NSString
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 AsMut<AnyObject> for NSPortCoder
impl AsMut<AnyObject> for NSPortCoder
source§impl AsMut<NSCoder> for NSPortCoder
impl AsMut<NSCoder> for NSPortCoder
source§impl AsMut<NSObject> for NSPortCoder
impl AsMut<NSObject> for NSPortCoder
source§impl AsMut<NSPortCoder> for NSPortCoder
impl AsMut<NSPortCoder> for NSPortCoder
source§impl AsRef<AnyObject> for NSPortCoder
impl AsRef<AnyObject> for NSPortCoder
source§impl AsRef<NSCoder> for NSPortCoder
impl AsRef<NSCoder> for NSPortCoder
source§impl AsRef<NSObject> for NSPortCoder
impl AsRef<NSObject> for NSPortCoder
source§impl AsRef<NSPortCoder> for NSPortCoder
impl AsRef<NSPortCoder> for NSPortCoder
source§impl Borrow<AnyObject> for NSPortCoder
impl Borrow<AnyObject> for NSPortCoder
source§impl Borrow<NSCoder> for NSPortCoder
impl Borrow<NSCoder> for NSPortCoder
source§impl Borrow<NSObject> for NSPortCoder
impl Borrow<NSObject> for NSPortCoder
source§impl BorrowMut<AnyObject> for NSPortCoder
impl BorrowMut<AnyObject> for NSPortCoder
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 BorrowMut<NSCoder> for NSPortCoder
impl BorrowMut<NSCoder> for NSPortCoder
source§fn borrow_mut(&mut self) -> &mut NSCoder
fn borrow_mut(&mut self) -> &mut NSCoder
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for NSPortCoder
impl BorrowMut<NSObject> for NSPortCoder
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 ClassType for NSPortCoder
impl ClassType for NSPortCoder
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSPortCoder"
const NAME: &'static str = "NSPortCoder"
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 Debug for NSPortCoder
impl Debug for NSPortCoder
source§impl Deref for NSPortCoder
impl Deref for NSPortCoder
source§impl DerefMut for NSPortCoder
impl DerefMut for NSPortCoder
source§impl Hash for NSPortCoder
impl Hash for NSPortCoder
source§impl NSObjectProtocol for NSPortCoder
impl NSObjectProtocol for NSPortCoder
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for NSPortCoder
impl PartialEq for NSPortCoder
source§fn eq(&self, other: &NSPortCoder) -> bool
fn eq(&self, other: &NSPortCoder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSPortCoder
impl RefEncode for NSPortCoder
source§const ENCODING_REF: Encoding = <NSCoder as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSCoder as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSPortCoder
impl Message for NSPortCoder
impl StructuralPartialEq for NSPortCoder
Auto Trait Implementations§
impl !Freeze for NSPortCoder
impl !RefUnwindSafe for NSPortCoder
impl !Send for NSPortCoder
impl !Sync for NSPortCoder
impl !Unpin for NSPortCoder
impl !UnwindSafe for NSPortCoder
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
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
The immutable counterpart of the type, or
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
The mutable counterpart of the type, or
Self
if the type has no
mutable counterpart. Read more