Package-level declarations
Types
Link copied to clipboard
class DataStorePreferencesStorage<T : @Serializable Any>(key: String, serializer: KSerializer<T>, dataStore: DataStore<Preferences>) : Storage<T>
A repository for storing serializable objects in DataStore Preferences.
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
inline fun <T : @Serializable Any> DataStorePreferencesStorage(dataStore: DataStore<Preferences>, cacheable: Boolean = false): StorageDelegate<T>
Creates a new Storage instance for storing serializable objects in DataStore Preferences.
Link copied to clipboard
inline fun <T : @Serializable Any> DataStoreStorage(dataStore: DataStore<T?>, cacheable: Boolean = false): StorageDelegate<T>
Creates a new Storage instance for storing serializable objects in DataStore.
Link copied to clipboard
Creates a new Serializer instance for a given type T. The object will be serialized using kotlinx.serialization to/from JSON.
Link copied to clipboard
inline fun <T : Any> EncryptedDataToJsonSerializer(encryptor: Encryptor, serializer: KSerializer<T> = Json.serializersModule.serializer()): Serializer<T?>
Creates an encrypted serializer for the given type.
Link copied to clipboard
Creates a new Storage instance for storing objects in memory.