#[repr(transparent)]pub struct CKRecordSavePolicy(pub NSInteger);CKModifyRecordsOperation only.Expand description
Locally edited keys are sent to the server, updating the record if the server record has not been modified. This is the default and recommended save policy for regular use.
This policy compares the record change tag with the server record, and may return
CKErrorServerRecordChangedif the server record has been modified, for example by another device.
Note: A
CKSharerecord is always treated as
CKRecordSaveIfServerRecordUnchanged,regardless of the
savePolicyof the operation that modifies the share.
Locally edited keys are written to the server, updating the record even if the server record has been modified.
Note: This policy should be used with care, as it can overwrite changes made by other devices.
Any previously committed change to the server, for example by other devices, will always be overwritten by the locally changed value.
Note: A
CKSharerecord is always treated as
CKRecordSaveIfServerRecordUnchanged,regardless of the
savePolicyof the operation that modifies the share.
For non-CKShare records, this policy does not compare the record change tag and therefore will not return
CKErrorServerRecordChanged
All local keys are written to the server, updating the record even if the server record has been modified.
Note: This policy should be used with care. Any previously committed change to the server, for example by other devices, will be overwritten by the local value.
Keys present only on the server remain unchanged.
There are two common ways in which a server record will contain keys not present locally:
1 - Another client may have added a new key to the record since it was fetched.
2 - If
desiredKeyswas used with the fetch / query that returned this record, only a portion of the record’s keys may have been downloaded.
Note: A
CKSharerecord is always treated as
CKRecordSaveIfServerRecordUnchanged,regardless of the
savePolicyof the operation that modifies the share.
For non-CKShare records, this policy does not compare the record change tag and therefore will not return
CKErrorServerRecordChanged
See also Apple’s documentation
Tuple Fields§
§0: NSIntegerImplementations§
Source§impl CKRecordSavePolicy
impl CKRecordSavePolicy
pub const IfServerRecordUnchanged: Self
pub const ChangedKeys: Self
Trait Implementations§
Source§impl Clone for CKRecordSavePolicy
impl Clone for CKRecordSavePolicy
Source§fn clone(&self) -> CKRecordSavePolicy
fn clone(&self) -> CKRecordSavePolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more