implicit final class HListCodecEnrichedWithHListSupport[L <: HList] extends AnyVal
- Grouped
- Alphabetic
- By Inheritance
- HListCodecEnrichedWithHListSupport
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
+(other: String): String
- Implicit
- 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
-
def
->[B](y: B): (HListCodecEnrichedWithHListSupport[L], B)
- Implicit
- 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()
-
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]
When called on a
Codec[L]
for someL <: HList
, returns a new codec that encodes/decodes theHList L
followed by aB
.When called on a
Codec[L]
for someL <: HList
, returns a new codec that encodes/decodes theHList L
followed by aB
. That is, this operator is a codec-levelHList
append operation. -
def
::[B](codec: Codec[B]): Codec[::[B, L]]
When called on a
Codec[L]
for someL <: HList
, returns a new codec representingCodec[B :: L]
.When called on a
Codec[L]
for someL <: HList
, returns a new codec representingCodec[B :: L]
. That is, this operator is a codec-levelHList
prepend operation.- codec
codec to prepend
-
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]
When called on a
Codec[L]
for someL <: HList
, returns a new codec that encodes/decodes theHList K
followed by theHList L
. -
def
:~>:[B](codec: Codec[B])(implicit ev: =:=[Unit, B]): Codec[L]
When called on a
Codec[L]
for someL <: HList
, returns a new codec that encodes/decodesB :: L
but only returnsL
.When called on a
Codec[L]
for someL <: HList
, returns a new codec that encodes/decodesB :: L
but only returnsL
. HList equivalent of~>
. -
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
derive[A]: DeriveHListElementAux[L, A]
Supports building a
Codec[M]
for someHList M
whereM
is theHList
that results in removing the firstA
fromL
.Supports building a
Codec[M]
for someHList M
whereM
is theHList
that results in removing the firstA
fromL
.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 typeA
is removed from theHList
.When encoding, the returned codec computes an
A
value using the supplied function and inserts the computedA
in to theHList M
, yielding anHList L
. ThatHList L
is then encoded using the original codec.This method is called
derive
because the value of typeA
is derived from the other fields in theHList L
.- A
type to remove from
L
and derive from the resulting list
-
def
dropUnits[M <: HList](implicit du: Aux[L, M]): Codec[M]
Creates a new codec with all unit values filtered out.
-
def
ensuring(cond: (HListCodecEnrichedWithHListSupport[L]) ⇒ Boolean, msg: ⇒ Any): HListCodecEnrichedWithHListSupport[L]
- Implicit
- 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
-
def
ensuring(cond: (HListCodecEnrichedWithHListSupport[L]) ⇒ Boolean): HListCodecEnrichedWithHListSupport[L]
- Implicit
- 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
-
def
ensuring(cond: Boolean, msg: ⇒ Any): HListCodecEnrichedWithHListSupport[L]
- Implicit
- 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
-
def
ensuring(cond: Boolean): HListCodecEnrichedWithHListSupport[L]
- Implicit
- 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
-
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]
When called on a
Codec[L]
for someL <: HList
, returns a new codec that encodes/decodes theHList L
followed by the valueA
, where the latter is encoded/decoded with the codec returned from applyingL
tof
. -
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]
When called on a
Codec[L]
for someL <: HList
, returns a new codec that encodes/decodes theHList L
followed by theHList M
, where the latter is encoded/decoded with the codec returned from applyingL
tof
. -
def
formatted(fmtstr: String): String
- Implicit
- 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()
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
polyxmap[M <: HList](p: Poly, q: Poly)(implicit lToM: Aux[p.type, L, M], mToL: Aux[q.type, M, L]): Codec[M]
Polymorphic function version of
xmap
.Polymorphic function version of
xmap
.When called on a
Codec[L]
for someL <: HList
, returns a new codec that's the result of xmapping withp
andq
, usingp
to convert fromL
toM
and usingq
to convert fromM
toL
.- p
polymorphic function that converts from
L
toM
- q
polymorphic function that converts from
M
toL
-
def
polyxmap1[M <: HList](p: Poly)(implicit m: Aux[p.type, L, M], m2: Aux[p.type, M, L]): Codec[M]
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 someL <: HList
, returns a new codec that's the result of xmapping withp
for both forward and reverse directions.- p
polymorphic function that converts from
L
toM
and fromM
toL
- val self: Codec[L]
-
def
toString(): String
- Definition Classes
- Any
-
def
→[B](y: B): (HListCodecEnrichedWithHListSupport[L], B)
- Implicit
- 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