io.github.raptros.bson

CodecBson

sealed trait CodecBson[A] extends EncodeBson[A] with DecodeBson[A]

CodecBson is both an EncodeBson and a DecodeBson.

A

the type this codec encodes and decodes.

Linear Supertypes
DecodeBson[A], EncodeBson[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CodecBson
  2. DecodeBson
  3. EncodeBson
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val decoder: DecodeBson[A]

  2. abstract val encoder: EncodeBson[A]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def &&&[B](x: DecodeBson[B]): DecodeBson[(A, B)]

    creates a decoder that applies this decoder and x and returns both results together.

    creates a decoder that applies this decoder and x and returns both results together.

    Definition Classes
    DecodeBson
  4. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  5. def apply(dbo: DBObject): DecodeResult[A]

    an alias for decode

    an alias for decode

    Definition Classes
    DecodeBson
  6. def apply(a: A): DBObject

    alias for encode

    alias for encode

    Definition Classes
    EncodeBson
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def contramap[B](f: (B) ⇒ A): EncodeBson[B]

    derives a new encoder by transforming them into things this encoder applies to.

    derives a new encoder by transforming them into things this encoder applies to.

    B

    something that can be transformed.

    f

    a function that transforms a B into an A

    returns

    an encoder for B

    Definition Classes
    EncodeBson
  10. def decode(c: DBObject): DecodeResult[A]

    this is the method that needs to be implemented to decode.

    this is the method that needs to be implemented to decode.

    returns

    a DecodeResult with A as the success.

    Definition Classes
    CodecBsonDecodeBson
  11. def encode(a: A): DBObject

    encodes an A into a mongo DBObject

    encodes an A into a mongo DBObject

    Definition Classes
    CodecBsonEncodeBson
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def flatMap[B](f: (A) ⇒ DecodeBson[B]): DecodeBson[B]

    derives a new DecodeBson by transforming decoded values using a function that produces a new DecodeBson.

    derives a new DecodeBson by transforming decoded values using a function that produces a new DecodeBson.

    B

    a type

    f

    a function that produces a DecodeBson using the values produced by this one. the decoder returned by f will be applied to to the same dbo that this decoder extracted the value it passed to f from. the value returned by applying that new decoder is the value that the new decoder will return.

    returns

    a decooder for B

    Definition Classes
    DecodeBson
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def map[B](f: (A) ⇒ B): DecodeBson[B]

    derives a new DecodeBson from this one by transforming the values decoded from this one

    derives a new DecodeBson from this one by transforming the values decoded from this one

    B

    the type that f returns

    f

    a function that transforms values produced by this DecodeBson

    returns

    a DecodeBson for B

    Definition Classes
    DecodeBson
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def orElse[B >: A](x: ⇒ DecodeBson[B]): DecodeBson[B]

    creates a decoder that first uses this decoder and then another decoder.

    creates a decoder that first uses this decoder and then another decoder. has an alias |||.

    B

    a supertype of A that is common to both this decoder and x. this is the return type of the new decoder.

    x

    a decoder that will be tried if this one fails

    returns

    a decoder that returns the first successfully decoded value

    Definition Classes
    DecodeBson
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. def validate(f: (DBObject) ⇒ Boolean, msg: (DBObject) ⇒ DecodeError): DecodeBson[A]

    creates a decoder that applies a predicate to a dbo before it tries to apply this decoder.

    creates a decoder that applies a predicate to a dbo before it tries to apply this decoder.

    f

    a predicate on DBObjects.

    msg

    a function that takes the DBObject that failed the predicate, and produces a DecodeError explaining what went wrong.

    Definition Classes
    DecodeBson
  27. def validateFields(count: Int): DecodeBson[A]

    creates a decoder that only applies this decoder if the dbo has exactly count fields

    creates a decoder that only applies this decoder if the dbo has exactly count fields

    Definition Classes
    DecodeBson
  28. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def |||[B >: A](x: ⇒ DecodeBson[B]): DecodeBson[B]

    alias for orElse

    alias for orElse

    Definition Classes
    DecodeBson

Inherited from DecodeBson[A]

Inherited from EncodeBson[A]

Inherited from AnyRef

Inherited from Any

Ungrouped