toSet

inline suspend fun <T> SharedFlow<T>.toSet(destination: MutableSet<T>): Nothing(source)

A specialized version of Flow.toSet that returns Nothing to indicate that SharedFlow collection never completes.


suspend fun <T> Flow<T>.toSet(destination: MutableSet<T> = LinkedHashSet()): Set<T>(source)

Collects given flow into a destination