Skip to main content

CKRecord

Struct CKRecord 

Source
pub struct CKRecord { /* private fields */ }
Expand description

Wraps CKRecord.

Implementations§

Source§

impl CKRecord

Source

pub fn new(record_type: &str) -> Result<Self, CloudKitError>

Creates a wrapper mirroring CKRecord.

Source

pub fn with_record_id( record_type: impl Into<String>, record_id: CKRecordID, ) -> Self

Sets the value mirroring CKRecord.recordID.

Source

pub fn with_zone( record_type: impl Into<String>, zone_id: CKRecordZoneID, ) -> Self

Sets the value mirroring CKRecord.zone.

Source

pub fn record_type(&self) -> &str

Mirrors CKRecord.recordType.

Source

pub fn record_id(&self) -> &CKRecordID

Mirrors CKRecord.recordID.

Source

pub fn record_change_tag(&self) -> Option<&str>

Mirrors CKRecord.recordChangeTag.

Source

pub const fn creator_user_record_id(&self) -> Option<&CKRecordID>

Mirrors CKRecord.creatorUserRecordID.

Source

pub fn creation_date(&self) -> Option<&str>

Mirrors CKRecord.creationDate.

Source

pub const fn last_modified_user_record_id(&self) -> Option<&CKRecordID>

Mirrors CKRecord.lastModifiedUserRecordID.

Source

pub fn modification_date(&self) -> Option<&str>

Mirrors CKRecord.modificationDate.

Source

pub const fn parent(&self) -> Option<&CKReference>

Mirrors CKRecord.parent.

Source

pub const fn share(&self) -> Option<&CKReference>

Mirrors CKRecord.share.

Source

pub fn changed_keys(&self) -> &[String]

Mirrors CKRecord.changedKeys.

Source

pub fn all_tokens(&self) -> &[String]

Mirrors CKRecord.allTokens.

Source

pub fn object(&self, key: &str) -> Option<&RecordValue>

Mirrors CKRecord.object.

Source

pub fn set_object<V>(&mut self, key: &str, value: V)
where V: Into<RecordValue>,

Mirrors CKRecord.setObject.

Source

pub fn remove_object(&mut self, key: &str) -> Option<RecordValue>

Mirrors CKRecord.removeObject.

Source

pub fn all_keys(&self) -> Vec<String>

Mirrors CKRecord.allKeys.

Source

pub fn encoded_system_fields(&self) -> &[u8]

Mirrors CKRecord.encodedSystemFields.

Source

pub fn set_parent_reference(&mut self, reference: CKReference)

Mirrors CKRecord.setParentReference.

Source

pub fn set_parent_reference_from_record(&mut self, parent_record: &CKRecord)

Mirrors CKRecord.setParentReferenceFromRecord.

Source

pub fn set_parent_reference_from_record_id( &mut self, parent_record_id: CKRecordID, )

Mirrors CKRecord.setParentReferenceFromRecordID.

Source

pub fn clear_parent_reference(&mut self)

Mirrors CKRecord.clearParentReference.

Trait Implementations§

Source§

impl CKRecordKeyValueSetting for CKRecord

Source§

fn object_for_key(&self, key: &str) -> Option<&RecordValue>

Mirrors CKRecord.objectForKey.
Source§

fn set_object_for_key<V>(&mut self, key: &str, value: V)
where V: Into<RecordValue>,

Mirrors CKRecord.setObjectForKey.
Source§

fn object_for_keyed_subscript(&self, key: &str) -> Option<&RecordValue>

Mirrors CKRecord.objectForKeyedSubscript.
Source§

fn set_object_for_keyed_subscript<V>(&mut self, key: &str, value: V)
where V: Into<RecordValue>,

Mirrors CKRecord.setObjectForKeyedSubscript.
Source§

fn all_keys(&self) -> Vec<String>

Mirrors CKRecord.allKeys.
Source§

fn changed_keys(&self) -> &[String]

Mirrors CKRecord.changedKeys.
Source§

impl Clone for CKRecord

Source§

fn clone(&self) -> CKRecord

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CKRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CKRecord

Source§

fn eq(&self, other: &CKRecord) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CKRecord

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.