#[repr(C)]pub struct CNContactStore {
pub ptr: Id<Object>,
}
Expand description
The object that fetches and saves contacts, groups, and containers from the user’s contacts database.
Fields§
§ptr: Id<Object>
The raw pointer to the Objective-C object.
Implementations§
Source§impl CNContactStore
impl CNContactStore
Sourcepub fn request_access_for_entity_type_completion_handler<F>(
&self,
entity_type: CNEntityType,
completion_handler: F,
)
pub fn request_access_for_entity_type_completion_handler<F>( &self, entity_type: CNEntityType, completion_handler: F, )
Requests access to the user’s contacts.
Returns the current authorization status to access the contact data.
Sourcepub fn enumerate_contacts_with_fetch_request_using_block<F>(
&self,
fetch_request: CNContactFetchRequest,
block: F,
) -> Result<bool, NSError>
pub fn enumerate_contacts_with_fetch_request_using_block<F>( &self, fetch_request: CNContactFetchRequest, block: F, ) -> Result<bool, NSError>
Returns a Boolean value that indicates whether the enumeration of all contacts matching a contact fetch request executed successfully.
Sourcepub fn unified_me_contact_with_keys_to_fetch(
&self,
keys: NSArray<id>,
) -> Result<CNContact, NSError>
pub fn unified_me_contact_with_keys_to_fetch( &self, keys: NSArray<id>, ) -> Result<CNContact, NSError>
Fetches the unified contact that’s the me card.
Sourcepub fn unified_contact_with_identifier_keys_to_fetch(
&self,
identifier: NSString,
keys: NSArray<id>,
) -> Result<CNContact, NSError>
pub fn unified_contact_with_identifier_keys_to_fetch( &self, identifier: NSString, keys: NSArray<id>, ) -> Result<CNContact, NSError>
Fetches a unified contact for the specified contact identifier.
Sourcepub fn unified_contacts_matching_predicate_keys_to_fetch(
&self,
predicate: NSPredicate,
keys: NSArray<id>,
) -> Result<NSArray<CNContact>, NSError>
pub fn unified_contacts_matching_predicate_keys_to_fetch( &self, predicate: NSPredicate, keys: NSArray<id>, ) -> Result<NSArray<CNContact>, NSError>
Fetches all unified contacts matching the specified predicate.
Sourcepub fn enumerator_for_contact_fetch_request(
&self,
fetch_request: CNContactFetchRequest,
) -> Result<CNFetchResult<NSEnumerator<CNContact>>, NSError>
pub fn enumerator_for_contact_fetch_request( &self, fetch_request: CNContactFetchRequest, ) -> Result<CNFetchResult<NSEnumerator<CNContact>>, NSError>
Enumerates a contact fetch request.
Sourcepub fn default_container_identifier(&self) -> NSString
pub fn default_container_identifier(&self) -> NSString
Returns the identifier of the default container.
Sourcepub fn groups_matching_predicate(
&self,
predicate: NSPredicate,
) -> Result<NSArray<CNGroup>, NSError>
pub fn groups_matching_predicate( &self, predicate: NSPredicate, ) -> Result<NSArray<CNGroup>, NSError>
Fetches all groups matching the specified predicate.
Sourcepub fn containers_matching_predicate(
&self,
predicate: NSPredicate,
) -> Result<NSArray<CNContainer>, NSError>
pub fn containers_matching_predicate( &self, predicate: NSPredicate, ) -> Result<NSArray<CNContainer>, NSError>
Fetches all containers matching the specified predicate.
Sourcepub fn enumerator_for_change_history_fetch_request(
&self,
request: CNChangeHistoryFetchRequest,
) -> Result<CNFetchResult<NSEnumerator<CNChangeHistoryEvent>>, NSError>
pub fn enumerator_for_change_history_fetch_request( &self, request: CNChangeHistoryFetchRequest, ) -> Result<CNFetchResult<NSEnumerator<CNChangeHistoryEvent>>, NSError>
Enumerates a change history fetch request.
Sourcepub fn current_history_token(&self) -> NSData
pub fn current_history_token(&self) -> NSData
The current history token.
Sourcepub fn execute_save_request(
&self,
request: CNSaveRequest,
) -> Result<bool, NSError>
pub fn execute_save_request( &self, request: CNSaveRequest, ) -> Result<bool, NSError>
Executes a save request and returns success or failure.
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.