ConsumeSerializableLifecycleEffect

@Composable
inline fun <T : @Serializable Any> ConsumeSerializableLifecycleEffect(key: String, lifecycleEvent: Lifecycle.Event = Lifecycle.Event.ON_START, crossinline catcher: (T) -> Unit)(source)

A Composable effect that consumes serializable objects of type T at a specific lifecycle event.

This function is similar to CatchSerializableLifecycleEffect but automatically returns true after the catcher function is called, indicating that the object was successfully handled.

Parameters

T

The type of serializable object to consume

key

The unique identifier for this effect, used to match the thrown object

lifecycleEvent

The lifecycle event at which to consume the object, defaults to Lifecycle.Event.ON_START

catcher

A function that processes the caught object without needing to return a handling status


@Composable
inline fun <T : @Serializable Any> ConsumeSerializableLifecycleEffect(lifecycleEvent: Lifecycle.Event = Lifecycle.Event.ON_START, crossinline catcher: (T) -> Unit)(source)

A Composable effect that consumes serializable objects of type T at a specific lifecycle event.

This overload automatically uses the qualified name of type T as the key and is similar to CatchSerializableLifecycleEffect but automatically returns true after the catcher function is called, indicating that the object was successfully handled.

Parameters

T

The type of serializable object to consume

lifecycleEvent

The lifecycle event at which to consume the object, defaults to Lifecycle.Event.ON_START

catcher

A function that processes the caught object without needing to return a handling status