pub struct CKRecord { /* private fields */ }Expand description
Wraps CKRecord.
Implementations§
Source§impl CKRecord
impl CKRecord
Sourcepub fn new(record_type: &str) -> Result<Self, CloudKitError>
pub fn new(record_type: &str) -> Result<Self, CloudKitError>
Creates a wrapper mirroring CKRecord.
Sourcepub fn with_record_id(
record_type: impl Into<String>,
record_id: CKRecordID,
) -> Self
pub fn with_record_id( record_type: impl Into<String>, record_id: CKRecordID, ) -> Self
Sets the value mirroring CKRecord.recordID.
Sourcepub fn with_zone(
record_type: impl Into<String>,
zone_id: CKRecordZoneID,
) -> Self
pub fn with_zone( record_type: impl Into<String>, zone_id: CKRecordZoneID, ) -> Self
Sets the value mirroring CKRecord.zone.
Sourcepub fn record_type(&self) -> &str
pub fn record_type(&self) -> &str
Mirrors CKRecord.recordType.
Sourcepub fn record_id(&self) -> &CKRecordID
pub fn record_id(&self) -> &CKRecordID
Mirrors CKRecord.recordID.
Sourcepub fn record_change_tag(&self) -> Option<&str>
pub fn record_change_tag(&self) -> Option<&str>
Mirrors CKRecord.recordChangeTag.
Sourcepub const fn creator_user_record_id(&self) -> Option<&CKRecordID>
pub const fn creator_user_record_id(&self) -> Option<&CKRecordID>
Mirrors CKRecord.creatorUserRecordID.
Sourcepub fn creation_date(&self) -> Option<&str>
pub fn creation_date(&self) -> Option<&str>
Mirrors CKRecord.creationDate.
Sourcepub const fn last_modified_user_record_id(&self) -> Option<&CKRecordID>
pub const fn last_modified_user_record_id(&self) -> Option<&CKRecordID>
Mirrors CKRecord.lastModifiedUserRecordID.
Sourcepub fn modification_date(&self) -> Option<&str>
pub fn modification_date(&self) -> Option<&str>
Mirrors CKRecord.modificationDate.
Sourcepub const fn parent(&self) -> Option<&CKReference>
pub const fn parent(&self) -> Option<&CKReference>
Mirrors CKRecord.parent.
Mirrors CKRecord.share.
Sourcepub fn changed_keys(&self) -> &[String]
pub fn changed_keys(&self) -> &[String]
Mirrors CKRecord.changedKeys.
Sourcepub fn all_tokens(&self) -> &[String]
pub fn all_tokens(&self) -> &[String]
Mirrors CKRecord.allTokens.
Sourcepub fn object(&self, key: &str) -> Option<&RecordValue>
pub fn object(&self, key: &str) -> Option<&RecordValue>
Mirrors CKRecord.object.
Sourcepub fn set_object<V>(&mut self, key: &str, value: V)where
V: Into<RecordValue>,
pub fn set_object<V>(&mut self, key: &str, value: V)where
V: Into<RecordValue>,
Mirrors CKRecord.setObject.
Sourcepub fn remove_object(&mut self, key: &str) -> Option<RecordValue>
pub fn remove_object(&mut self, key: &str) -> Option<RecordValue>
Mirrors CKRecord.removeObject.
Sourcepub fn encoded_system_fields(&self) -> &[u8] ⓘ
pub fn encoded_system_fields(&self) -> &[u8] ⓘ
Mirrors CKRecord.encodedSystemFields.
Sourcepub fn set_parent_reference(&mut self, reference: CKReference)
pub fn set_parent_reference(&mut self, reference: CKReference)
Mirrors CKRecord.setParentReference.
Sourcepub fn set_parent_reference_from_record(&mut self, parent_record: &CKRecord)
pub fn set_parent_reference_from_record(&mut self, parent_record: &CKRecord)
Mirrors CKRecord.setParentReferenceFromRecord.
Sourcepub fn set_parent_reference_from_record_id(
&mut self,
parent_record_id: CKRecordID,
)
pub fn set_parent_reference_from_record_id( &mut self, parent_record_id: CKRecordID, )
Mirrors CKRecord.setParentReferenceFromRecordID.
Sourcepub fn clear_parent_reference(&mut self)
pub fn clear_parent_reference(&mut self)
Mirrors CKRecord.clearParentReference.
Trait Implementations§
Source§impl CKRecordKeyValueSetting for CKRecord
impl CKRecordKeyValueSetting for CKRecord
Source§fn object_for_key(&self, key: &str) -> Option<&RecordValue>
fn object_for_key(&self, key: &str) -> Option<&RecordValue>
CKRecord.objectForKey.Source§fn set_object_for_key<V>(&mut self, key: &str, value: V)where
V: Into<RecordValue>,
fn set_object_for_key<V>(&mut self, key: &str, value: V)where
V: Into<RecordValue>,
CKRecord.setObjectForKey.Source§fn object_for_keyed_subscript(&self, key: &str) -> Option<&RecordValue>
fn object_for_keyed_subscript(&self, key: &str) -> Option<&RecordValue>
CKRecord.objectForKeyedSubscript.Source§fn set_object_for_keyed_subscript<V>(&mut self, key: &str, value: V)where
V: Into<RecordValue>,
fn set_object_for_keyed_subscript<V>(&mut self, key: &str, value: V)where
V: Into<RecordValue>,
CKRecord.setObjectForKeyedSubscript.Source§fn changed_keys(&self) -> &[String]
fn changed_keys(&self) -> &[String]
CKRecord.changedKeys.