androidx.savedstate.compose.serialization.serializers

Classes

Top-level functions summary

inline MutableStateSerializer

Creates a KSerializer for a MutableState containing a Serializable value of type T.

Cmn
inline SnapshotStateListSerializer

Creates a KSerializer for a SnapshotStateList containing serializable elements of type T.

Cmn
inline SnapshotStateMapSerializer

Creates a KSerializer for a SnapshotStateMap containing serializable keys of type K and serializable values of type V.

Cmn

Top-level functions

MutableStateSerializer

inline fun Any?> MutableStateSerializer(): MutableStateSerializer

Creates a KSerializer for a MutableState containing a Serializable value of type T.

This inline function infers the state type T automatically and retrieves the appropriate KSerializer for serialization and deserialization of MutableState.

Parameters
Any?>

The type of the value stored in the MutableState.

Returns
MutableStateSerializer

A MutableStateSerializer for handling MutableState containing a Serializable type T.

SnapshotStateListSerializer

inline fun Any?> SnapshotStateListSerializer(): SnapshotStateListSerializer

Creates a KSerializer for a SnapshotStateList containing serializable elements of type T.

This inline function automatically infers the element type T and retrieves the corresponding KSerializer for serializing and deserializing SnapshotStateList instances.

Parameters
Any?>

The type of elements stored in the SnapshotStateList.

Returns
SnapshotStateListSerializer

A SnapshotStateListSerializer for handling serialization and deserialization of a SnapshotStateList containing elements of type T.

SnapshotStateMapSerializer

inline fun Any?, V : Any?> SnapshotStateMapSerializer(): SnapshotStateMapSerializer

Creates a KSerializer for a SnapshotStateMap containing serializable keys of type K and serializable values of type V.

This inline function automatically infers the key type K and value type V, and retrieves the corresponding KSerializer for serializing and deserializing SnapshotStateMap instances.

Parameters
Any?>

The type of keys stored in the SnapshotStateMap.

Any?>

The type of values stored in the SnapshotStateMap.

Returns
SnapshotStateMapSerializer

A SnapshotStateMapSerializer for handling serialization and deserialization of a SnapshotStateMap containing keys of type K and values of type V.