KeyWriter

reactivemongo.api.bson.KeyWriter$
See theKeyWriter companion trait
object KeyWriter

KeyWriter factories

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def apply[T](write: T => String): KeyWriter[T]

Creates a KeyWriter based on the given write function.

Creates a KeyWriter based on the given write function.

Attributes

def from[T](writeTry: T => Try[String]): KeyWriter[T]

Creates a KeyWriter based on the given writeTry function.

Creates a KeyWriter based on the given writeTry function.

Attributes

Implicits

Implicits

implicit def keyWriter[T](implicit conv: T => String): KeyWriter[T]

Provides a KeyWriter instance of any T type that can be viewed as a String.

Provides a KeyWriter instance of any T type that can be viewed as a String.

Attributes

implicit def localeWriter: KeyWriter[Locale]

Supports writing locales as keys, using language tag as string representation.

Supports writing locales as keys, using language tag as string representation.

import reactivemongo.api.bson.KeyWriter

implicitly[KeyWriter[java.util.Locale]].writeTry(java.util.Locale.FRANCE)
// => Success("fr-FR")

Attributes

implicit def uuidWriter: KeyWriter[UUID]

Supports writing UUID as keys.

Supports writing UUID as keys.

import reactivemongo.api.bson.KeyWriter

implicitly[KeyWriter[java.util.UUID]].writeTry(
 java.util.UUID fromString "BDE87A8B-52F6-4345-9BCE-A30F4CB9FCB4")
// => Success("BDE87A8B-52F6-4345-9BCE-A30F4CB9FCB4")

Attributes

Inherited implicits

implicit def anyValKeyWriter[T <: AnyVal]: KeyWriter[T]

Attributes

Inherited from:
LowPriorityKeyWriter (hidden)