reactivemongo.api.bson.KeyReader$
See theKeyReader companion trait
object KeyReader
Members list
Concise view
Value members
Concrete methods
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.
Attributes
Implicits
Implicits
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)
Attributes
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"})