Creates a KeyReader based on the given read
function.
Creates a KeyReader based on the given partial function.
Creates a KeyReader based on the given partial function.
A exceptions.ValueDoesNotMatchException is returned as Failure
for any BSON value that is not matched by the read
function.
Creates a KeyReader based on the given readTry
function.
Provides a KeyReader instance of any T
type
that can be parsed from a String
.
Supports reading locales as keys, using language tag as string representation.
Supports reading locales as keys, using language tag as string representation.
import reactivemongo.api.bson.KeyReader implicitly[KeyReader[java.util.Locale]].readTry("fr-FR") // => Success(Locale.FRANCE)
Creates a KeyReader based on the given read
function.
Supports reading UUID
as keys.
Supports reading UUID
as keys.
import reactivemongo.api.bson.KeyReader implicitly[KeyReader[java.util.UUID]]. readTry("BDE87A8B-52F6-4345-9BCE-A30F4CB9FCB4") // => Success(java.util.UUID{"BDE87A8B-52F6-4345-9BCE-A30F4CB9FCB4"})