Struct objc2_foundation::NSUnarchiver
source · #[repr(C)]pub struct NSUnarchiver { /* private fields */ }
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate features
NSArchiver
and NSCoder
only.Implementations§
source§impl NSUnarchiver
impl NSUnarchiver
pub unsafe fn initForReadingWithData( this: Allocated<Self>, data: &NSData ) -> Option<Retained<Self>>
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSData
only.pub unsafe fn setObjectZone(&self, zone: *mut NSZone)
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSZone
only.pub unsafe fn objectZone(&self) -> *mut NSZone
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSZone
only.pub unsafe fn isAtEnd(&self) -> bool
👎Deprecated: Use NSKeyedUnarchiver instead
pub unsafe fn systemVersion(&self) -> c_uint
👎Deprecated: Use NSKeyedUnarchiver instead
pub unsafe fn unarchiveObjectWithData( data: &NSData ) -> Option<Retained<AnyObject>>
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSData
only.pub unsafe fn unarchiveObjectWithFile( path: &NSString ) -> Option<Retained<AnyObject>>
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSString
only.pub unsafe fn decodeClassName_asClassName_class( in_archive_name: &NSString, true_name: &NSString )
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSString
only.pub unsafe fn decodeClassName_asClassName( &self, in_archive_name: &NSString, true_name: &NSString )
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSString
only.pub unsafe fn classNameDecodedForArchiveClassName_class( in_archive_name: &NSString ) -> Retained<NSString>
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSString
only.pub unsafe fn classNameDecodedForArchiveClassName( &self, in_archive_name: &NSString ) -> Retained<NSString>
👎Deprecated: Use NSKeyedUnarchiver instead
Available on crate feature
NSString
only.pub unsafe fn replaceObject_withObject( &self, object: &AnyObject, new_object: &AnyObject )
👎Deprecated: Use NSKeyedUnarchiver instead
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 NSUnarchiver
impl AsMut<AnyObject> for NSUnarchiver
source§impl AsMut<NSCoder> for NSUnarchiver
impl AsMut<NSCoder> for NSUnarchiver
source§impl AsMut<NSObject> for NSUnarchiver
impl AsMut<NSObject> for NSUnarchiver
source§impl AsMut<NSUnarchiver> for NSUnarchiver
impl AsMut<NSUnarchiver> for NSUnarchiver
source§impl AsRef<AnyObject> for NSUnarchiver
impl AsRef<AnyObject> for NSUnarchiver
source§impl AsRef<NSCoder> for NSUnarchiver
impl AsRef<NSCoder> for NSUnarchiver
source§impl AsRef<NSObject> for NSUnarchiver
impl AsRef<NSObject> for NSUnarchiver
source§impl AsRef<NSUnarchiver> for NSUnarchiver
impl AsRef<NSUnarchiver> for NSUnarchiver
source§impl Borrow<AnyObject> for NSUnarchiver
impl Borrow<AnyObject> for NSUnarchiver
source§impl Borrow<NSCoder> for NSUnarchiver
impl Borrow<NSCoder> for NSUnarchiver
source§impl Borrow<NSObject> for NSUnarchiver
impl Borrow<NSObject> for NSUnarchiver
source§impl BorrowMut<AnyObject> for NSUnarchiver
impl BorrowMut<AnyObject> for NSUnarchiver
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 NSUnarchiver
impl BorrowMut<NSCoder> for NSUnarchiver
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 NSUnarchiver
impl BorrowMut<NSObject> for NSUnarchiver
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 NSUnarchiver
impl ClassType for NSUnarchiver
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSUnarchiver"
const NAME: &'static str = "NSUnarchiver"
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 NSUnarchiver
impl Debug for NSUnarchiver
source§impl Deref for NSUnarchiver
impl Deref for NSUnarchiver
source§impl DerefMut for NSUnarchiver
impl DerefMut for NSUnarchiver
source§impl Hash for NSUnarchiver
impl Hash for NSUnarchiver
source§impl NSObjectProtocol for NSUnarchiver
impl NSObjectProtocol for NSUnarchiver
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 NSUnarchiver
impl PartialEq for NSUnarchiver
source§fn eq(&self, other: &NSUnarchiver) -> bool
fn eq(&self, other: &NSUnarchiver) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSUnarchiver
impl RefEncode for NSUnarchiver
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 NSUnarchiver
impl Message for NSUnarchiver
impl StructuralPartialEq for NSUnarchiver
Auto Trait Implementations§
impl !Freeze for NSUnarchiver
impl !RefUnwindSafe for NSUnarchiver
impl !Send for NSUnarchiver
impl !Sync for NSUnarchiver
impl !Unpin for NSUnarchiver
impl !UnwindSafe for NSUnarchiver
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