trait BsonValueDecoderInstances extends LowPriorityBsonValueDecoderInstances
- Alphabetic
- By Inheritance
- BsonValueDecoderInstances
- LowPriorityBsonValueDecoderInstances
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
implicit
def
bsonArrayDecoder[C[_], A](implicit arg0: BsonValueDecoder[A], cbf: CanBuildFrom[Nothing, A, C[A]]): BsonValueDecoder[C[A]]
Decodes instances of
BsonArray
asC[A]
, providedC
as aCanBuildFrom
andA
a BsonValueDecoder.Decodes instances of
BsonArray
asC[A]
, providedC
as aCanBuildFrom
andA
a BsonValueDecoder.For example:
scala> BsonValueDecoder[List[Int]].decode(BsonArray(Seq(BsonInt(1), BsonInt(2), BsonInt(3)))) res0> DecodeResult[List[Int]] = Success(List(1, 2, 3))
-
implicit
val
bsonBooleanDecoder: BsonValueDecoder[Boolean]
Decodes instances of BsonBoolean as
Boolean
.Decodes instances of BsonBoolean as
Boolean
.For example:
scala> BsonValueDecoder[Boolean].decode(BsonBoolean(true)) res0: DecodeResult[Boolean] = Success(true)
-
implicit
val
bsonDoubleDecoder: BsonValueDecoder[Double]
Decodes instances of BsonDouble, BsonMaxKey and BsonMinKey as
Double
.Decodes instances of BsonDouble, BsonMaxKey and BsonMinKey as
Double
.For example:
scala> BsonValueDecoder[Double].decode(BsonDouble(0.5)) res0: DecodeResult[Double] = Success(0.5)
scala> BsonValueDecoder[Double].decode(BsonMinKey) res1: DecodeResult[Double] = Success(-1.7976931348623157E308)
scala> BsonValueDecoder[Double].decode(BsonMaxKey) res2: DecodeResult[Double] = Success(1.7976931348623157E308)
-
implicit
val
bsonFileDecoder: BsonValueDecoder[File]
Decodes instances of BsonString as
File
.Decodes instances of BsonString as
File
.For example:
scala> import java.io._ scala> BsonValueDecoder[File].decode(BsonString("/var/log")) res0: DecodeResult[File] = Success(/var/log)
-
implicit
val
bsonIntDecoder: BsonValueDecoder[Int]
Decodes instances of BsonInt, BsonMaxKey and BsonMinKey as
Int
.Decodes instances of BsonInt, BsonMaxKey and BsonMinKey as
Int
.For example:
scala> BsonValueDecoder[Int].decode(BsonInt(1)) res0: DecodeResult[Int] = Success(1)
scala> BsonValueDecoder[Int].decode(BsonMinKey) res1: DecodeResult[Int] = Success(-2147483648)
scala> BsonValueDecoder[Int].decode(BsonMaxKey) res2: DecodeResult[Int] = Success(2147483647)
-
implicit
val
bsonLongDecoder: BsonValueDecoder[Long]
Decodes instances of BsonLong, BsonMaxKey and BsonMinKey as
Long
.Decodes instances of BsonLong, BsonMaxKey and BsonMinKey as
Long
.For example:
scala> BsonValueDecoder[Long].decode(BsonLong(1L)) res0: DecodeResult[Long] = Success(1)
scala> BsonValueDecoder[Long].decode(BsonMinKey) res1: DecodeResult[Long] = Success(-9223372036854775808)
scala> BsonValueDecoder[Long].decode(BsonMaxKey) res2: DecodeResult[Long] = Success(9223372036854775807)
-
implicit
val
bsonObjectIdDecoder: BsonValueDecoder[ObjectId]
Decodes instances of BsonObjectId as
ObjectId
.Decodes instances of BsonObjectId as
ObjectId
.For example:
scala> import org.bson.types._ scala> BsonValueDecoder[ObjectId].decode(BsonObjectId(new ObjectId("58c64e6a54757ec4c09c525e"))) res0: DecodeResult[ObjectId] = Success(58c64e6a54757ec4c09c525e)
-
implicit
def
bsonOptionDecoder[A](implicit arg0: BsonValueDecoder[A]): BsonValueDecoder[Option[A]]
Decodes instances of BsonNull as
None
and BsonValue asSome(A)
, provided there exists aBsonValueDecoder[A]
in implicit scope.Decodes instances of BsonNull as
None
and BsonValue asSome(A)
, provided there exists aBsonValueDecoder[A]
in implicit scope.For example:
scala> BsonValueDecoder[Option[Int]].decode(BsonNull) res0> DecodeResult[Option[Int]] = None scala> BsonValueDecoder[Option[Int]].decode(BsonInt(1)) res0> DecodeResult[Option[Int]] = Some(1)
-
implicit
val
bsonPathDecoder: BsonValueDecoder[Path]
Decodes instances of BsonString as
Path
.Decodes instances of BsonString as
Path
.For example:
scala> import java.nio.file._ scala> BsonValueDecoder[Path].decode(BsonString("/var/log")) res0: DecodeResult[Path] = Success(/var/log)
-
implicit
val
bsonRegularExpressionDecoder: BsonValueDecoder[Pattern]
Decodes instances of BsonRegularExpression as
Pattern
.Decodes instances of BsonRegularExpression as
Pattern
.For example:
scala> import java.util.regex._ scala> BsonValueDecoder[Pattern].decode(BsonRegularExpression(Pattern.compile("[a-zA-Z]*"))) res0: DecodeResult[Pattern] = Success([a-zA-Z]*)
-
implicit
val
bsonStringDecoder: BsonValueDecoder[String]
Decodes instances of BsonString as
String
.Decodes instances of BsonString as
String
.For example:
scala> BsonValueDecoder[String].decode(BsonString("foobar")) res0: DecodeResult[String] = Success(foobar)
-
implicit
val
bsonUriDecoder: BsonValueDecoder[URI]
Decodes instances of BsonString as
URI
.Decodes instances of BsonString as
URI
.For example:
scala> import java.net._ scala> BsonValueDecoder[URI].decode(BsonString("http://localhost")) res0: DecodeResult[URI] = Success(http://localhost)
-
implicit
val
bsonUrlDecoder: BsonValueDecoder[URL]
Decodes instances of BsonString as
URL
.Decodes instances of BsonString as
URL
.For example:
scala> import java.net._ scala> BsonValueDecoder[URL].decode(BsonString("http://localhost")) res0: DecodeResult[URL] = Success(http://localhost)
-
implicit
val
bsonUuidDecoder: BsonValueDecoder[UUID]
Decodes instances of BsonUuid as
UUID
.Decodes instances of BsonUuid as
UUID
.For example:
scala> import java.util._ scala> BsonValueDecoder[UUID].decode(BsonUuid(UUID.fromString("123e4567-e89b-12d3-a456-426655440000"))) res0: DecodeResult[UUID] = Success(123e4567-e89b-12d3-a456-426655440000)
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
implicit
def
decoderFromDocument[A](implicit arg0: BsonDocumentDecoder[A]): BsonValueDecoder[A]
- Definition Classes
- LowPriorityBsonValueDecoderInstances
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromStringDecoder[A](implicit arg0: StringDecoder[A]): BsonValueDecoder[A]
Creates a new BsonValueDecoder from the specified
StringDecoder
.Creates a new BsonValueDecoder from the specified
StringDecoder
.Note that the resulting decoder will only work on values of type BsonString.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val javaUtilDateDecoder: BsonValueDecoder[Date]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )