kotlinxSerializationBoomerangCatcher

inline fun <T : @Serializable Any> kotlinxSerializationBoomerangCatcher(crossinline catcher: (T) -> Boolean): BoomerangCatcher(source)

Creates a BoomerangCatcher that deserializes the caught boomerang into an object of type T using Kotlinx Serialization.

This function simplifies the creation of a boomerang catcher that works with serializable objects. It automatically handles the deserialization process before passing the typed object to the provided catcher function.

Return

A BoomerangCatcher that deserializes the boomerang and delegates to the provided catcher function

Parameters

T

The type of serializable object to deserialize the boomerang into

catcher

A function that processes the deserialized object and returns true if it was handled successfully