Packages

t

reactivemongo.bson

VariantBSONWriter

trait VariantBSONWriter[-T, +B <: BSONValue] extends AnyRef

A writer that produces a subtype of BSONValue from an instance of T.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. VariantBSONWriter
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def write(t: T): B

    Writes an instance of T as a BSON value.

    Writes an instance of T as a BSON value.

    This method may throw exceptions at runtime. If used outside a reader, one should consider writeTry(bson: B): Try[T] or writeOpt(bson: B): Option[T].

Concrete Value Members

  1. def writeOpt(t: T): Option[B]

    Tries to produce a BSON value from an instance of T, returns None if an error occurred.

  2. def writeTry(t: T): Try[B]

    Tries to produce a BSON value from an instance of T.