pub enum TapSdkError {
InitFailed {
result: InitResult,
message: String,
},
NotInitialized,
AuthorizeFailed(AuthorizeResult),
CloudSaveRequestFailed(CloudSaveResult),
ApiError {
code: i64,
message: String,
},
InvalidArgument(String),
NullPointer,
Utf8Error(Utf8Error),
NulError(NulError),
}Expand description
Main error type for TapSDK operations
Variants§
InitFailed
SDK initialization failed
NotInitialized
SDK not initialized
AuthorizeFailed(AuthorizeResult)
Authorization failed
CloudSaveRequestFailed(CloudSaveResult)
Cloud save operation failed to start
ApiError
API error returned from the SDK
InvalidArgument(String)
Invalid argument provided
NullPointer
Null pointer returned
Utf8Error(Utf8Error)
UTF-8 conversion error
NulError(NulError)
String contains null byte
Implementations§
Source§impl TapSdkError
impl TapSdkError
Sourcepub fn from_api_error(code: i64, message: impl Into<String>) -> Self
pub fn from_api_error(code: i64, message: impl Into<String>) -> Self
Create an API error from SDK error code and message
Sourcepub unsafe fn from_raw_error(error: *const TapSDK_Error) -> Option<Self>
pub unsafe fn from_raw_error(error: *const TapSDK_Error) -> Option<Self>
Create an API error from raw SDK error pointer
§Safety
The error pointer must be valid and point to a valid TapSDK_Error struct
Trait Implementations§
Source§impl Debug for TapSdkError
impl Debug for TapSdkError
Source§impl Display for TapSdkError
impl Display for TapSdkError
Source§impl Error for TapSdkError
impl Error for TapSdkError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<NulError> for TapSdkError
impl From<NulError> for TapSdkError
Auto Trait Implementations§
impl Freeze for TapSdkError
impl RefUnwindSafe for TapSdkError
impl Send for TapSdkError
impl Sync for TapSdkError
impl Unpin for TapSdkError
impl UnwindSafe for TapSdkError
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