Class

scodec

HListCodecEnrichedWithHListSupport

Related Doc: package scodec

Permalink

implicit final class HListCodecEnrichedWithHListSupport[L <: HList] extends AnyVal

Provides common operations on a Codec[HList].

Source
package.scala
Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Grouped
  2. Alphabetic
  3. By inheritance
Inherited
  1. HListCodecEnrichedWithHListSupport
  2. AnyVal
  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. All

Instance Constructors

  1. new HListCodecEnrichedWithHListSupport(self: Codec[L])

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to any2stringadd[HListCodecEnrichedWithHListSupport[L]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (HListCodecEnrichedWithHListSupport[L], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to ArrowAssoc[HListCodecEnrichedWithHListSupport[L]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. def :+[B, LB <: HList](codec: Codec[B])(implicit prepend: shapeless.ops.hlist.Prepend.Aux[L, ::[B, HNil], LB], init: Aux[LB, L], last: Aux[LB, B]): Codec[LB]

    Permalink

    When called on a Codec[L] for some L <: HList, returns a new codec that encodes/decodes the HList L followed by a B.

    When called on a Codec[L] for some L <: HList, returns a new codec that encodes/decodes the HList L followed by a B. That is, this operator is a codec-level HList append operation.

  6. def ::[B](codec: Codec[B]): Codec[::[B, L]]

    Permalink

    When called on a Codec[L] for some L <: HList, returns a new codec representing Codec[B :: L].

    When called on a Codec[L] for some L <: HList, returns a new codec representing Codec[B :: L]. That is, this operator is a codec-level HList prepend operation.

    codec

    codec to prepend

  7. def :::[K <: HList, KL <: HList, KLen <: Nat](k: Codec[K])(implicit prepend: shapeless.ops.hlist.Prepend.Aux[K, L, KL], lengthK: Aux[K, KLen], split: Aux[KL, KLen, K, L]): Codec[KL]

    Permalink

    When called on a Codec[L] for some L <: HList, returns a new codec that encodes/decodes the HList K followed by the HList L.

  8. def :~>:[B](codec: Codec[B])(implicit ev: =:=[Unit, B]): Codec[L]

    Permalink

    When called on a Codec[L] for some L <: HList, returns a new codec that encodes/decodes B :: L but only returns L.

    When called on a Codec[L] for some L <: HList, returns a new codec that encodes/decodes B :: L but only returns L. HList equivalent of ~>.

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

    Permalink
    Definition Classes
    Any
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def derive[A]: DeriveHListElementAux[L, A]

    Permalink

    Supports building a Codec[M] for some HList M where M is the HList that results in removing the first A from L.

    Supports building a Codec[M] for some HList M where M is the HList that results in removing the first A from L.

    Example usage:

    case class Flags(x: Boolean, y: Boolean, z: Boolean)
    val c = (bool :: bool :: bool :: ignore(5)).flatPrepend { flgs =>
      conditional(flgs.x, uint8) :: conditional(flgs.y, uint8) :: conditional(flgs.z, uint8)
    }
    c.derive[Flags].from { case x :: y :: z :: HNil => Flags(x.isDefined, y.isDefined, z.isDefined) }

    This codec, the Codec[L], is used for encoding/decoding. When decoding, the first value of type A is removed from the HList.

    When encoding, the returned codec computes an A value using the supplied function and inserts the computed A in to the HList M, yielding an HList L. That HList L is then encoded using the original codec.

    This method is called derive because the value of type A is derived from the other fields in the HList L.

    A

    type to remove from L and derive from the resulting list

  12. def dropUnits[M <: HList](implicit du: Aux[L, M]): Codec[M]

    Permalink

    Creates a new codec with all unit values filtered out.

  13. def ensuring(cond: (HListCodecEnrichedWithHListSupport[L]) ⇒ Boolean, msg: ⇒ Any): HListCodecEnrichedWithHListSupport[L]

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to Ensuring[HListCodecEnrichedWithHListSupport[L]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (HListCodecEnrichedWithHListSupport[L]) ⇒ Boolean): HListCodecEnrichedWithHListSupport[L]

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to Ensuring[HListCodecEnrichedWithHListSupport[L]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean, msg: ⇒ Any): HListCodecEnrichedWithHListSupport[L]

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to Ensuring[HListCodecEnrichedWithHListSupport[L]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): HListCodecEnrichedWithHListSupport[L]

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to Ensuring[HListCodecEnrichedWithHListSupport[L]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def flatAppend[A, LA <: HList, Len <: Nat](f: (L) ⇒ Codec[A])(implicit prepend: shapeless.ops.hlist.Prepend.Aux[L, ::[A, HNil], LA], length: Aux[L, Len], split: Aux[LA, Len, L, ::[A, HNil]]): Codec[LA]

    Permalink

    When called on a Codec[L] for some L <: HList, returns a new codec that encodes/decodes the HList L followed by the value A, where the latter is encoded/decoded with the codec returned from applying L to f.

  18. def flatConcat[M <: HList, LM <: HList, LLen <: Nat](f: (L) ⇒ Codec[M])(implicit prepend: shapeless.ops.hlist.Prepend.Aux[L, M, LM], lengthK: Aux[L, LLen], split: Aux[LM, LLen, L, M]): Codec[LM]

    Permalink

    When called on a Codec[L] for some L <: HList, returns a new codec that encodes/decodes the HList L followed by the HList M, where the latter is encoded/decoded with the codec returned from applying L to f.

  19. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to StringFormat[HListCodecEnrichedWithHListSupport[L]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  20. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def polyxmap[M <: HList](p: Poly, q: Poly)(implicit lToM: Aux[p.type, L, M], mToL: Aux[q.type, M, L]): Codec[M]

    Permalink

    Polymorphic function version of xmap.

    Polymorphic function version of xmap.

    When called on a Codec[L] for some L <: HList, returns a new codec that's the result of xmapping with p and q, using p to convert from L to M and using q to convert from M to L.

    p

    polymorphic function that converts from L to M

    q

    polymorphic function that converts from M to L

  23. def polyxmap1[M <: HList](p: Poly)(implicit m: Aux[p.type, L, M], m2: Aux[p.type, M, L]): Codec[M]

    Permalink

    Polymorphic function version of xmap that uses a single polymorphic function in both directions.

    Polymorphic function version of xmap that uses a single polymorphic function in both directions.

    When called on a Codec[L] for some L <: HList, returns a new codec that's the result of xmapping with p for both forward and reverse directions.

    p

    polymorphic function that converts from L to M and from M to L

  24. val self: Codec[L]

    Permalink
  25. def toString(): String

    Permalink
    Definition Classes
    Any
  26. def [B](y: B): (HListCodecEnrichedWithHListSupport[L], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from HListCodecEnrichedWithHListSupport[L] to ArrowAssoc[HListCodecEnrichedWithHListSupport[L]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyVal

Inherited from Any

Inherited by implicit conversion any2stringadd from HListCodecEnrichedWithHListSupport[L] to any2stringadd[HListCodecEnrichedWithHListSupport[L]]

Inherited by implicit conversion StringFormat from HListCodecEnrichedWithHListSupport[L] to StringFormat[HListCodecEnrichedWithHListSupport[L]]

Inherited by implicit conversion Ensuring from HListCodecEnrichedWithHListSupport[L] to Ensuring[HListCodecEnrichedWithHListSupport[L]]

Inherited by implicit conversion ArrowAssoc from HListCodecEnrichedWithHListSupport[L] to ArrowAssoc[HListCodecEnrichedWithHListSupport[L]]

generic

hlist

Ungrouped