Package-level declarations
Types
This object is used to access the device's local storage.
This class will be used in setWithResult and other extensions for DeviceStorage to represent special error happen in operations of DeviceStorage
This value class represent strongly-typed errors of DeviceStorage operations and required to separate it with string args
This class provides access to the secure local storage, which is persistent and tied to the user's Telegram account. Data stored in secure storage is accessible only to the Web App that saved it.
This class will be used in setWithResult and other extensions for DeviceStorage to represent special error happen in operations of DeviceStorage
This value class represent strongly-typed errors of DeviceStorage operations and required to separate it with string args
Functions
Clears all key-value pairs from the storage. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred.
Clears all key-value pairs from secure storage. This suspending function handles the result directly and throws an exception if an error occurs.
Retrieves the value associated with a key. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred.
Retrieves the value associated with a key from secure storage. This function uses a callback-based approach for handling the asynchronous result of the operation.
Retrieves the value associated with a key. This function uses a CompletableDeferred to handle the asynchronous callback and returns a Result object.
Retrieves the value associated with a key from secure storage using a CompletableDeferred and returns a Result. This suspending function encapsulates the asynchronous operation of retrieving a value and provides a structured way to handle both successful retrieval and potential errors. It uses a CompletableDeferred to manage the asynchronous result.
Removes the key-value pair associated with a key. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred.
Removes the key-value pair associated with a key from secure storage. This suspending function handles the result directly and throws an exception if an error occurs.
Restores the value associated with a key in secure storage. This suspending function handles the result directly and throws an exception if an error occurs.
Restores the value associated with a key in secure storage using a CompletableDeferred and returns a Result.
Stores a key-value pair. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred.
Stores a key-value pair in secure storage. This suspending function handles the result directly and throws an exception if an error occurs.