io.github.raptros.bson

DecodeBson

trait DecodeBson[+A] extends AnyRef

the typeclass of things that can be decoded from DBObjects.

A

not certain what effect the covariance on A has.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DecodeBson
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def decode(dbo: 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.

    dbo

    the object to attempt to decode an A from.

    returns

    a DecodeResult with A as the success.

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.

  4. final def ==(arg0: Any): Boolean

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

    an alias for decode

  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. 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

  12. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  15. 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

  16. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  19. 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

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. 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.

  23. def validateFields(count: Int): DecodeBson[A]

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

  24. final def wait(): Unit

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

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

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

    alias for orElse

Inherited from AnyRef

Inherited from Any

Ungrouped