pub struct CloudClient { /* private fields */ }Expand description
Cloud API client for sync operations.
Implementations§
Source§impl CloudClient
impl CloudClient
Sourcepub fn with_api_key(self, api_key: &str) -> Self
pub fn with_api_key(self, api_key: &str) -> Self
Sets the API key for authentication.
Sourcepub fn status(&self) -> Result<SyncStatus, CloudError>
pub fn status(&self) -> Result<SyncStatus, CloudError>
Gets the sync status from the cloud service.
Returns information about the user’s sync state including session count, storage usage, and last sync time.
Sourcepub fn push(
&self,
sessions: Vec<PushSession>,
) -> Result<PushResponse, CloudError>
pub fn push( &self, sessions: Vec<PushSession>, ) -> Result<PushResponse, CloudError>
Pushes sessions to the cloud service.
Uploads encrypted session data to the cloud. Session metadata is stored unencrypted for display purposes, while message content is encrypted.
Sourcepub fn pull(
&self,
since: Option<DateTime<Utc>>,
) -> Result<PullResponse, CloudError>
pub fn pull( &self, since: Option<DateTime<Utc>>, ) -> Result<PullResponse, CloudError>
Pulls sessions from the cloud service.
Downloads sessions that have been modified since the given timestamp. Session message content is encrypted and must be decrypted by the caller.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CloudClient
impl !RefUnwindSafe for CloudClient
impl Send for CloudClient
impl Sync for CloudClient
impl Unpin for CloudClient
impl !UnwindSafe for CloudClient
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