Skip to main content

CloudSave

Struct CloudSave 

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

Cloud save API handle

This struct provides access to cloud save functionality. Get an instance via CloudSave::get().

Implementations§

Source§

impl CloudSave

Source

pub fn get() -> Option<Self>

Get the cloud save singleton instance

§Returns

A CloudSave instance, or None if the SDK is not initialized

Source

pub fn list(&self, request_id: i64) -> Result<()>

Request the list of cloud saves

The result will be delivered via the CloudSaveList event when calling TapSdk::run_callbacks().

§Arguments
  • request_id - A unique ID to identify this request in the callback
Source

pub fn create(&self, request_id: i64, request: &CreateSaveRequest) -> Result<()>

Create a new cloud save

The result will be delivered via the CloudSaveCreate event when calling TapSdk::run_callbacks().

§Arguments
  • request_id - A unique ID to identify this request in the callback
  • request - The create request parameters
Source

pub fn update(&self, request_id: i64, request: &UpdateSaveRequest) -> Result<()>

Update an existing cloud save

The result will be delivered via the CloudSaveUpdate event when calling TapSdk::run_callbacks().

§Arguments
  • request_id - A unique ID to identify this request in the callback
  • request - The update request parameters
Source

pub fn delete(&self, request_id: i64, uuid: &str) -> Result<()>

Delete a cloud save

The result will be delivered via the CloudSaveDelete event when calling TapSdk::run_callbacks().

§Arguments
  • request_id - A unique ID to identify this request in the callback
  • uuid - The unique ID of the cloud save to delete
Source

pub fn get_data(&self, request_id: i64, uuid: &str, file_id: &str) -> Result<()>

Get the data file for a cloud save

The result will be delivered via the CloudSaveGetData event when calling TapSdk::run_callbacks().

§Arguments
  • request_id - A unique ID to identify this request in the callback
  • uuid - The unique ID of the cloud save
  • file_id - The file ID of the cloud save (from CloudSaveInfo)
Source

pub fn get_cover( &self, request_id: i64, uuid: &str, file_id: &str, ) -> Result<()>

Get the cover image for a cloud save

The result will be delivered via the CloudSaveGetCover event when calling TapSdk::run_callbacks().

§Arguments
  • request_id - A unique ID to identify this request in the callback
  • uuid - The unique ID of the cloud save
  • file_id - The file ID of the cloud save (from CloudSaveInfo)

Trait Implementations§

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> 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, 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.