Secure Local Storage Result
A sealed class representing the result of an operation in secure local storage.
This class is used to encapsulate the outcome of secure local storage operations, allowing differentiation between successful and unsuccessful results.
Inheritors
Types
Properties
Functions
Link copied to clipboard
Returns the exception associated with a failed operation or null if the operation was successful.
Link copied to clipboard
Returns the stored data as a ByteArray if this instance is a successful result and the data can be cast to ByteArray. If the result is unsuccessful or the data cannot be cast, returns null.
Link copied to clipboard
Retrieves the encapsulated data from the result as a String, or returns null if the data is not a String or if the result is a failure.
Link copied to clipboard
inline fun SecureLocalStorageResult.onFailure(block: (SecureLocalStorageError) -> Unit): SecureLocalStorageResult
Execute a block if the result is a failure.
Link copied to clipboard
Execute a block if the result is successful.