Struct objc2_contacts::CNMutableContact
source · #[repr(C)]pub struct CNMutableContact { /* private fields */ }
Available on crate features
CNContact
and CNMutableContact
only.Implementations§
source§impl CNMutableContact
impl CNMutableContact
pub unsafe fn contactType(&self) -> CNContactType
pub unsafe fn setContactType(&self, contact_type: CNContactType)
pub unsafe fn namePrefix(&self) -> Retained<NSString>
pub unsafe fn setNamePrefix(&self, name_prefix: &NSString)
pub unsafe fn givenName(&self) -> Retained<NSString>
pub unsafe fn setGivenName(&self, given_name: &NSString)
pub unsafe fn middleName(&self) -> Retained<NSString>
pub unsafe fn setMiddleName(&self, middle_name: &NSString)
pub unsafe fn familyName(&self) -> Retained<NSString>
pub unsafe fn setFamilyName(&self, family_name: &NSString)
pub unsafe fn previousFamilyName(&self) -> Retained<NSString>
pub unsafe fn setPreviousFamilyName(&self, previous_family_name: &NSString)
pub unsafe fn nameSuffix(&self) -> Retained<NSString>
pub unsafe fn setNameSuffix(&self, name_suffix: &NSString)
pub unsafe fn nickname(&self) -> Retained<NSString>
pub unsafe fn setNickname(&self, nickname: &NSString)
pub unsafe fn organizationName(&self) -> Retained<NSString>
pub unsafe fn setOrganizationName(&self, organization_name: &NSString)
pub unsafe fn departmentName(&self) -> Retained<NSString>
pub unsafe fn setDepartmentName(&self, department_name: &NSString)
pub unsafe fn jobTitle(&self) -> Retained<NSString>
pub unsafe fn setJobTitle(&self, job_title: &NSString)
pub unsafe fn phoneticGivenName(&self) -> Retained<NSString>
pub unsafe fn setPhoneticGivenName(&self, phonetic_given_name: &NSString)
pub unsafe fn phoneticMiddleName(&self) -> Retained<NSString>
pub unsafe fn setPhoneticMiddleName(&self, phonetic_middle_name: &NSString)
pub unsafe fn phoneticFamilyName(&self) -> Retained<NSString>
pub unsafe fn setPhoneticFamilyName(&self, phonetic_family_name: &NSString)
pub unsafe fn phoneticOrganizationName(&self) -> Retained<NSString>
pub unsafe fn setPhoneticOrganizationName( &self, phonetic_organization_name: &NSString )
pub unsafe fn note(&self) -> Retained<NSString>
pub unsafe fn setNote(&self, note: &NSString)
pub unsafe fn imageData(&self) -> Option<Retained<NSData>>
pub unsafe fn setImageData(&self, image_data: Option<&NSData>)
pub unsafe fn phoneNumbers( &self ) -> Retained<NSArray<CNLabeledValue<CNPhoneNumber>>>
Available on crate features
CNLabeledValue
and CNPhoneNumber
only.pub unsafe fn setPhoneNumbers( &self, phone_numbers: &NSArray<CNLabeledValue<CNPhoneNumber>> )
Available on crate features
CNLabeledValue
and CNPhoneNumber
only.pub unsafe fn emailAddresses( &self ) -> Retained<NSArray<CNLabeledValue<NSString>>>
Available on crate feature
CNLabeledValue
only.pub unsafe fn setEmailAddresses( &self, email_addresses: &NSArray<CNLabeledValue<NSString>> )
Available on crate feature
CNLabeledValue
only.pub unsafe fn postalAddresses( &self ) -> Retained<NSArray<CNLabeledValue<CNPostalAddress>>>
Available on crate features
CNLabeledValue
and CNPostalAddress
only.pub unsafe fn setPostalAddresses( &self, postal_addresses: &NSArray<CNLabeledValue<CNPostalAddress>> )
Available on crate features
CNLabeledValue
and CNPostalAddress
only.pub unsafe fn urlAddresses(&self) -> Retained<NSArray<CNLabeledValue<NSString>>>
Available on crate feature
CNLabeledValue
only.pub unsafe fn setUrlAddresses( &self, url_addresses: &NSArray<CNLabeledValue<NSString>> )
Available on crate feature
CNLabeledValue
only.pub unsafe fn contactRelations( &self ) -> Retained<NSArray<CNLabeledValue<CNContactRelation>>>
Available on crate features
CNContactRelation
and CNLabeledValue
only.pub unsafe fn setContactRelations( &self, contact_relations: &NSArray<CNLabeledValue<CNContactRelation>> )
Available on crate features
CNContactRelation
and CNLabeledValue
only.Available on crate features
CNLabeledValue
and CNSocialProfile
only.pub unsafe fn setSocialProfiles( &self, social_profiles: &NSArray<CNLabeledValue<CNSocialProfile>> )
Available on crate features
CNLabeledValue
and CNSocialProfile
only.pub unsafe fn instantMessageAddresses( &self ) -> Retained<NSArray<CNLabeledValue<CNInstantMessageAddress>>>
Available on crate features
CNInstantMessageAddress
and CNLabeledValue
only.pub unsafe fn setInstantMessageAddresses( &self, instant_message_addresses: &NSArray<CNLabeledValue<CNInstantMessageAddress>> )
Available on crate features
CNInstantMessageAddress
and CNLabeledValue
only.pub unsafe fn birthday(&self) -> Option<Retained<NSDateComponents>>
pub unsafe fn setBirthday(&self, birthday: Option<&NSDateComponents>)
pub unsafe fn nonGregorianBirthday(&self) -> Option<Retained<NSDateComponents>>
pub unsafe fn setNonGregorianBirthday( &self, non_gregorian_birthday: Option<&NSDateComponents> )
pub unsafe fn dates( &self ) -> Retained<NSArray<CNLabeledValue<NSDateComponents>>>
Available on crate feature
CNLabeledValue
only.pub unsafe fn setDates(&self, dates: &NSArray<CNLabeledValue<NSDateComponents>>)
Available on crate feature
CNLabeledValue
only.Methods from Deref<Target = CNContact>§
pub unsafe fn identifier(&self) -> Retained<NSString>
pub unsafe fn contactType(&self) -> CNContactType
pub unsafe fn namePrefix(&self) -> Retained<NSString>
pub unsafe fn givenName(&self) -> Retained<NSString>
pub unsafe fn middleName(&self) -> Retained<NSString>
pub unsafe fn familyName(&self) -> Retained<NSString>
pub unsafe fn previousFamilyName(&self) -> Retained<NSString>
pub unsafe fn nameSuffix(&self) -> Retained<NSString>
pub unsafe fn nickname(&self) -> Retained<NSString>
pub unsafe fn organizationName(&self) -> Retained<NSString>
pub unsafe fn departmentName(&self) -> Retained<NSString>
pub unsafe fn jobTitle(&self) -> Retained<NSString>
pub unsafe fn phoneticGivenName(&self) -> Retained<NSString>
pub unsafe fn phoneticMiddleName(&self) -> Retained<NSString>
pub unsafe fn phoneticFamilyName(&self) -> Retained<NSString>
pub unsafe fn phoneticOrganizationName(&self) -> Retained<NSString>
pub unsafe fn note(&self) -> Retained<NSString>
pub unsafe fn imageData(&self) -> Option<Retained<NSData>>
pub unsafe fn thumbnailImageData(&self) -> Option<Retained<NSData>>
pub unsafe fn imageDataAvailable(&self) -> bool
pub unsafe fn phoneNumbers( &self ) -> Retained<NSArray<CNLabeledValue<CNPhoneNumber>>>
Available on crate features
CNLabeledValue
and CNPhoneNumber
only.pub unsafe fn emailAddresses( &self ) -> Retained<NSArray<CNLabeledValue<NSString>>>
Available on crate feature
CNLabeledValue
only.pub unsafe fn postalAddresses( &self ) -> Retained<NSArray<CNLabeledValue<CNPostalAddress>>>
Available on crate features
CNLabeledValue
and CNPostalAddress
only.pub unsafe fn urlAddresses(&self) -> Retained<NSArray<CNLabeledValue<NSString>>>
Available on crate feature
CNLabeledValue
only.pub unsafe fn contactRelations( &self ) -> Retained<NSArray<CNLabeledValue<CNContactRelation>>>
Available on crate features
CNContactRelation
and CNLabeledValue
only.Available on crate features
CNLabeledValue
and CNSocialProfile
only.pub unsafe fn instantMessageAddresses( &self ) -> Retained<NSArray<CNLabeledValue<CNInstantMessageAddress>>>
Available on crate features
CNInstantMessageAddress
and CNLabeledValue
only.pub unsafe fn birthday(&self) -> Option<Retained<NSDateComponents>>
pub unsafe fn nonGregorianBirthday(&self) -> Option<Retained<NSDateComponents>>
pub unsafe fn dates( &self ) -> Retained<NSArray<CNLabeledValue<NSDateComponents>>>
Available on crate feature
CNLabeledValue
only.pub unsafe fn isKeyAvailable(&self, key: &NSString) -> bool
pub unsafe fn areKeysAvailable( &self, key_descriptors: &NSArray<ProtocolObject<dyn CNKeyDescriptor>> ) -> bool
pub unsafe fn isUnifiedWithContactWithIdentifier( &self, contact_identifier: &NSString ) -> bool
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 CNMutableContact
impl AsMut<AnyObject> for CNMutableContact
source§impl AsMut<CNContact> for CNMutableContact
impl AsMut<CNContact> for CNMutableContact
source§impl AsMut<CNMutableContact> for CNMutableContact
impl AsMut<CNMutableContact> for CNMutableContact
source§impl AsMut<NSObject> for CNMutableContact
impl AsMut<NSObject> for CNMutableContact
source§impl AsRef<AnyObject> for CNMutableContact
impl AsRef<AnyObject> for CNMutableContact
source§impl AsRef<CNContact> for CNMutableContact
impl AsRef<CNContact> for CNMutableContact
source§impl AsRef<CNMutableContact> for CNMutableContact
impl AsRef<CNMutableContact> for CNMutableContact
source§impl AsRef<NSObject> for CNMutableContact
impl AsRef<NSObject> for CNMutableContact
source§impl Borrow<AnyObject> for CNMutableContact
impl Borrow<AnyObject> for CNMutableContact
source§impl Borrow<CNContact> for CNMutableContact
impl Borrow<CNContact> for CNMutableContact
source§impl Borrow<NSObject> for CNMutableContact
impl Borrow<NSObject> for CNMutableContact
source§impl BorrowMut<AnyObject> for CNMutableContact
impl BorrowMut<AnyObject> for CNMutableContact
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<CNContact> for CNMutableContact
impl BorrowMut<CNContact> for CNMutableContact
source§fn borrow_mut(&mut self) -> &mut CNContact
fn borrow_mut(&mut self) -> &mut CNContact
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for CNMutableContact
impl BorrowMut<NSObject> for CNMutableContact
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 CNMutableContact
impl ClassType for CNMutableContact
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "CNMutableContact"
const NAME: &'static str = "CNMutableContact"
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 CNMutableContact
impl Debug for CNMutableContact
source§impl Deref for CNMutableContact
impl Deref for CNMutableContact
source§impl DerefMut for CNMutableContact
impl DerefMut for CNMutableContact
source§impl Hash for CNMutableContact
impl Hash for CNMutableContact
source§impl NSCopying for CNMutableContact
impl NSCopying for CNMutableContact
source§impl NSMutableCopying for CNMutableContact
impl NSMutableCopying for CNMutableContact
source§impl NSObjectProtocol for CNMutableContact
impl NSObjectProtocol for CNMutableContact
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 NSSecureCoding for CNMutableContact
impl NSSecureCoding for CNMutableContact
source§impl PartialEq for CNMutableContact
impl PartialEq for CNMutableContact
source§fn eq(&self, other: &CNMutableContact) -> bool
fn eq(&self, other: &CNMutableContact) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for CNMutableContact
impl RefEncode for CNMutableContact
source§const ENCODING_REF: Encoding = <CNContact as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <CNContact as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for CNMutableContact
impl Message for CNMutableContact
impl NSCoding for CNMutableContact
impl StructuralPartialEq for CNMutableContact
Auto Trait Implementations§
impl !Freeze for CNMutableContact
impl !RefUnwindSafe for CNMutableContact
impl !Send for CNMutableContact
impl !Sync for CNMutableContact
impl !Unpin for CNMutableContact
impl !UnwindSafe for CNMutableContact
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