Struct objc2_contacts::CNContact
source · #[repr(C)]pub struct CNContact { /* private fields */ }
Available on crate feature
CNContact
only.Implementations§
source§impl CNContact
impl 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 localizedStringForKey(key: &NSString) -> Retained<NSString>
pub unsafe fn comparatorForNameSortOrder( sort_order: CNContactSortOrder ) -> NSComparator
Available on crate feature
block2
only.pub unsafe fn descriptorForAllComparatorKeys( ) -> Retained<ProtocolObject<dyn CNKeyDescriptor>>
pub unsafe fn isUnifiedWithContactWithIdentifier( &self, contact_identifier: &NSString ) -> bool
impl CNContact
This impl block contains no items.
NSItemProvider
source§impl CNContact
impl CNContact
Predicates
pub unsafe fn predicateForContactsMatchingName( name: &NSString ) -> Retained<NSPredicate>
Available on crate feature
CNContact_Predicates
only.pub unsafe fn predicateForContactsMatchingEmailAddress( email_address: &NSString ) -> Retained<NSPredicate>
Available on crate feature
CNContact_Predicates
only.pub unsafe fn predicateForContactsMatchingPhoneNumber( phone_number: &CNPhoneNumber ) -> Retained<NSPredicate>
Available on crate features
CNContact_Predicates
and CNPhoneNumber
only.pub unsafe fn predicateForContactsWithIdentifiers( identifiers: &NSArray<NSString> ) -> Retained<NSPredicate>
Available on crate feature
CNContact_Predicates
only.pub unsafe fn predicateForContactsInGroupWithIdentifier( group_identifier: &NSString ) -> Retained<NSPredicate>
Available on crate feature
CNContact_Predicates
only.pub unsafe fn predicateForContactsInContainerWithIdentifier( container_identifier: &NSString ) -> Retained<NSPredicate>
Available on crate feature
CNContact_Predicates
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<CNContact> for CNMutableContact
Available on crate feature CNMutableContact
only.
impl AsMut<CNContact> for CNMutableContact
Available on crate feature
CNMutableContact
only.source§impl AsRef<CNContact> for CNMutableContact
Available on crate feature CNMutableContact
only.
impl AsRef<CNContact> for CNMutableContact
Available on crate feature
CNMutableContact
only.source§impl Borrow<CNContact> for CNMutableContact
Available on crate feature CNMutableContact
only.
impl Borrow<CNContact> for CNMutableContact
Available on crate feature
CNMutableContact
only.source§impl BorrowMut<AnyObject> for CNContact
impl BorrowMut<AnyObject> for CNContact
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
Available on crate feature CNMutableContact
only.
impl BorrowMut<CNContact> for CNMutableContact
Available on crate feature
CNMutableContact
only.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 CNContact
impl BorrowMut<NSObject> for CNContact
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 CNContact
impl ClassType for CNContact
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "CNContact"
const NAME: &'static str = "CNContact"
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 NSItemProviderReading for CNContact
Available on crate feature CNContact_NSItemProvider
only.
impl NSItemProviderReading for CNContact
Available on crate feature
CNContact_NSItemProvider
only.source§impl NSItemProviderWriting for CNContact
Available on crate feature CNContact_NSItemProvider
only.
impl NSItemProviderWriting for CNContact
Available on crate feature
CNContact_NSItemProvider
only.source§unsafe fn writableTypeIdentifiersForItemProvider_class(
) -> Retained<NSArray<NSString>>
unsafe fn writableTypeIdentifiersForItemProvider_class( ) -> Retained<NSArray<NSString>>
Available on crate features
NSArray
and NSString
only.source§unsafe fn writableTypeIdentifiersForItemProvider(
&self
) -> Retained<NSArray<NSString>>
unsafe fn writableTypeIdentifiersForItemProvider( &self ) -> Retained<NSArray<NSString>>
Available on crate features
NSArray
and NSString
only.source§unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier_class(
type_identifier: &NSString
) -> NSItemProviderRepresentationVisibility
unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier_class( type_identifier: &NSString ) -> NSItemProviderRepresentationVisibility
Available on crate feature
NSString
only.source§unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier(
&self,
type_identifier: &NSString
) -> NSItemProviderRepresentationVisibility
unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier( &self, type_identifier: &NSString ) -> NSItemProviderRepresentationVisibility
Available on crate feature
NSString
only.source§impl NSMutableCopying for CNContact
impl NSMutableCopying for CNContact
source§impl NSObjectProtocol for CNContact
impl NSObjectProtocol for CNContact
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 CNContact
impl NSSecureCoding for CNContact
source§impl PartialEq for CNContact
impl PartialEq for CNContact
source§impl RefEncode for CNContact
impl RefEncode for CNContact
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for CNContact
impl Message for CNContact
impl NSCoding for CNContact
impl StructuralPartialEq for CNContact
Auto Trait Implementations§
impl !Freeze for CNContact
impl !RefUnwindSafe for CNContact
impl !Send for CNContact
impl !Sync for CNContact
impl !Unpin for CNContact
impl !UnwindSafe for CNContact
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