reactivemongo.api.bson.msb
package reactivemongo.api.bson.msb
Implicit conversions for handler & values types between org.bson and reactivemongo.api.bson .
import scala.reflect.ClassTag
import reactivemongo.api.bson.BSONWriter
import reactivemongo.api.bson.msb._
def writerToEncoder[T](w: BSONWriter[T])(implicit ct: ClassTag[T]) = {
// ClassTag required for generics
val enc: org.bson.codecs.Encoder[T] = w
enc
}
// From org.bson
import reactivemongo.api.bson.{ BSONDouble, BSONString, BSONValue }
val newStr: BSONString = new org.bson.BsonString("foo")
val newVal: BSONValue = new org.bson.BsonInt32(2)
// To org.bson
val oldStr: org.bson.BsonString = BSONString("bar")
val oldVal: org.bson.BsonValue = BSONDouble(1.2D)
For more specific imports, see ValueConverters and HandlerConverters .
Attributes
Members list
Type members
Classlikes
object HandlerConverters extends HandlerConverters
See msb$ and HandlerConverters
See msb$ and HandlerConverters
Attributes
- Companion
- trait
- Supertypes
- Self type
-
HandlerConverters.type
trait HandlerConverters
Implicit conversions for handler types between org.bson and reactivemongo.api.bson .
Implicit conversions for handler types between org.bson and reactivemongo.api.bson .
import reactivemongo.api.bson.msb.HandlerConverters._
def foo[T](enc: org.bson.codecs.Encoder[T]) = {
val w: reactivemongo.api.bson.BSONWriter[T] = enc
w
}
def bar[T](lr: reactivemongo.api.bson.BSONReader[T]) = {
val dec: org.bson.codecs.Decoder[T] = lr
dec
}
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object HandlerConverters
object ValueConverters extends ValueConverters
See msb$ and ValueConverters
trait ValueConverters
Implicit conversions for value types between org.bson and reactivemongo.api.bson.
Implicit conversions for value types between org.bson and reactivemongo.api.bson.
// Required import
import reactivemongo.api.bson.msb.ValueConverters._
// From org.bson
import reactivemongo.api.bson.{ BSONDouble, BSONString, BSONValue }
val newStr: BSONString = new org.bson.BsonString("foo")
val newVal: BSONValue = new org.bson.BsonInt32(2)
// To org.bson
val oldStr: org.bson.BsonString = BSONString("bar")
val oldVal: org.bson.BsonValue = BSONDouble(1.2D)
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object ValueConverters
Inherited classlikes
object DefaultCodecRegistry extends CodecRegistry
Attributes
- Inherited from:
- HandlerConverters
- Supertypes
-
trait CodecRegistryclass Objecttrait Matchableclass Any
Value members
Inherited methods
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Inherited fields
Attributes
- Inherited from:
- ValueConverters
Implicits
Inherited implicits
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
final implicit def fromHandler[T](h: BSONHandler[T])(implicit tt: ClassTag[T], cr: CodecRegistry): Codec[T]
Attributes
- Inherited from:
- HandlerConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- LowPriorityHandlerConverters1 (hidden)
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- LowPriorityConverters (hidden)
Attributes
- Inherited from:
- LowPriorityHandlerConverters1 (hidden)
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- HandlerConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- LowPriorityHandlerConverters1 (hidden)
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConverters
Attributes
- Inherited from:
- ValueConvertersCompat (hidden)
Attributes
- Inherited from:
- LowPriorityConverters (hidden)
Attributes
- Inherited from:
- LowPriorityHandlerConverters1 (hidden)
In this article