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
impl CloudSave
Sourcepub fn get() -> Option<Self>
pub fn get() -> Option<Self>
Get the cloud save singleton instance
§Returns
A CloudSave instance, or None if the SDK is not initialized
Sourcepub fn list(&self, request_id: i64) -> Result<()>
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
Sourcepub fn create(&self, request_id: i64, request: &CreateSaveRequest) -> Result<()>
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 callbackrequest- The create request parameters
Sourcepub fn update(&self, request_id: i64, request: &UpdateSaveRequest) -> Result<()>
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 callbackrequest- The update request parameters
Sourcepub fn delete(&self, request_id: i64, uuid: &str) -> Result<()>
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 callbackuuid- The unique ID of the cloud save to delete
Sourcepub fn get_data(&self, request_id: i64, uuid: &str, file_id: &str) -> Result<()>
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 callbackuuid- The unique ID of the cloud savefile_id- The file ID of the cloud save (from CloudSaveInfo)
Sourcepub fn get_cover(
&self,
request_id: i64,
uuid: &str,
file_id: &str,
) -> Result<()>
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 callbackuuid- The unique ID of the cloud savefile_id- The file ID of the cloud save (from CloudSaveInfo)