kmongo / kotlin.collections / com.mongodb.client.MongoIterable / toSet

toSet

fun <T> MongoIterable<T>.toSet(): Set<T> (source)

Returns a Set of all elements.

The returned set preserves the element iteration order of the original collection.