asChannelOfOrNull

inline suspend fun <T : Channel> ChannelBehavior.asChannelOfOrNull(): T?(source)

Requests to get the Channel represented by this ChannelBehavior, returns null if the Channel isn't present.

Throws

if anything went wrong during the request.

if the channel is not of type T