trait ShapelessInstances extends AnyRef
Provides Codec instances for case classes and sum types.
The purpose of this package is to let concrete Codec implementations (such as kantan.csv or
kantan.regex) focus on providing instances for HList and Coproduct. Once such instances exist, this package
will take care of the transformation from and to case classes and sum types.
Additionally, instances derived that way will be inserted with a sane precedence in the implicit resolution
mechanism. This means, for example, that they will not override bespoke Option or Either instances.
- Alphabetic
- By Inheritance
- ShapelessInstances
- 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
caseClassDecoder[E, D, F, T, H <: HList](implicit gen: Aux[D, H], dr: Lazy[Decoder[E, H, F, T]]): DerivedDecoder[E, D, F, T]
Provides a
Decoderinstance for case classes.Provides a
Decoderinstance for case classes.Given a case class
D, this expects nDecoderinstance for theHListtype corresponding toD. It will then rely on that to turn encoded values into anHList, then turn the resulting value into aD. -
implicit
def
caseClassDecoderFromLabelled[E, D, F, T, H <: HList](implicit generic: Aux[D, H], hDecoder: Lazy[Decoder[E, H, F, T]]): DerivedDecoder[E, D, F, T]
Similar to caseClassDecoder, but working with
LabelledGenericrather than justGeneric. -
implicit
def
caseClassEncoder[E, D, T, H <: HList](implicit gen: Aux[D, H], er: Lazy[Encoder[E, H, T]]): DerivedEncoder[E, D, T]
Provides an
Encoderinstance for case classes.Provides an
Encoderinstance for case classes.Given a case class
D, this expects anEncoderinstance for theHListtype corresponding toD. It will then simply turn values of typeDinto values of the correspondingHList, then let the encoder take it from there. -
implicit
def
caseClassEncoderFromLabelled[E, D, T, H <: HList](implicit generic: Aux[D, H], hEncoder: Lazy[Encoder[E, H, T]]): DerivedEncoder[E, D, T]
Similar to caseClassEncoder, but working with
LabelledGenericrather than justGeneric. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- implicit def cnilDecoder[E, F, T](implicit arg0: IsError[F]): Decoder[E, CNil, F, T]
-
implicit
def
cnilEncoder[E, D, T]: Encoder[E, CNil, T]
- Annotations
- @SuppressWarnings()
- implicit def coproductDecoder[E, H, D <: Coproduct, F, T](implicit dh: Decoder[E, H, F, T], dt: Decoder[E, D, F, T]): Decoder[E, :+:[H, D], F, T]
- implicit def coproductEncoder[E, H, D <: Coproduct, T](implicit eh: Encoder[E, H, T], ed: Encoder[E, D, T]): Encoder[E, :+:[H, D], T]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
implicit
def
sumTypeDecoder[E, D, F, T, C <: Coproduct](implicit gen: Aux[D, C], dr: Lazy[Decoder[E, C, F, T]]): DerivedDecoder[E, D, F, T]
Provides a
Decoderinstance for sum types.Provides a
Decoderinstance for sum types.Given a case class
D, this expects nDecoderinstance for theCoproducttype corresponding toD. It will then rely on that to turn encoded values into aCoproduct, then turn the resulting value into aD. -
implicit
def
sumTypeEncoder[E, D, T, C <: Coproduct](implicit gen: Aux[D, C], er: Lazy[Encoder[E, C, T]]): DerivedEncoder[E, D, T]
Provides an
Encoderinstance for sum types.Provides an
Encoderinstance for sum types.Given a sum type
D, this expects anEncoderinstance for theCoproducttype corresponding toD. It will then simply turn values of typeDinto values of the correspondingCoproduct, then let the encoder take it from there. -
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( ... ) @native()