getData

Get the data of the AssistantStreamEvent using the provided serializer from the corresponding event type.

Parameters

the type of the data.

Throws

if the AssistantStreamEvent data cannot be cast to the provided type.


fun <T> AssistantStreamEvent.getData(serializer: KSerializer<T>): T

Get the data of the AssistantStreamEvent using the provided serializer.

Throws

if the AssistantStreamEvent data cannot be cast to the provided type.