collect

inline suspend fun <T> Publisher<T>.collect(
    action: (T) -> Unit
): Unit

Subscribes to this Publisher and performs the specified action for each received element. Cancels subscription if any exception happens during collect.