VPackEncoder

avokka.velocypack.VPackEncoder$
See theVPackEncoder companion trait

Attributes

Companion
trait
Graph
Supertypes
trait Derivation[VPackEncoder]
trait SealedTraitDerivation
trait CommonDerivation[VPackEncoder]
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Inherited types

type Typeclass[T] = TypeClass[T]

Attributes

Inherited from:
CommonDerivation

Value members

Concrete methods

def apply[T](implicit encoder: VPackEncoder[T]): VPackEncoder[T]

Inherited methods

inline def `getParams__`[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], inheritedAnnotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], defaults: Map[String, Option[() => Any]], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
inline override protected def deriveSubtype[s](m: Of[s]): TypeClass[s]

Attributes

Definition Classes
Derivation -> SealedTraitDerivation
Inherited from:
Derivation
inline def derived[A]: TypeClass[A]

Attributes

Inherited from:
Derivation
inline protected def derivedMirrorProduct[A](product: ProductOf[A]): TypeClass[A]

Attributes

Inherited from:
CommonDerivation
inline def getParams[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
inline def getParams_[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], inheritedAnnotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
override def join[T](ctx: CaseClass[VPackEncoder, T]): VPackEncoder[T]

Must be implemented by the user of Magnolia to construct a typeclass for case class T using the provided type info. E.g. if we are deriving Show[T] typeclasses, and T is a case class Foo(...), we need to constuct Show[Foo].

Must be implemented by the user of Magnolia to construct a typeclass for case class T using the provided type info. E.g. if we are deriving Show[T] typeclasses, and T is a case class Foo(...), we need to constuct Show[Foo].

This method is called 'join' because typically it will join together the typeclasses for all the parameters of the case class, into a single typeclass for the case class itself. The field CaseClass.params can provide useful information for doing this.

Value parameters

caseClass

information about the case class T, its parameters, and their typeclasses

Attributes

Definition Classes
VPackEncoderDerivation -> CommonDerivation
Inherited from:
VPackEncoderDerivation
inline protected def sealedTraitFromMirror[A](m: SumOf[A]): SealedTrait[Typeclass, A]

Attributes

Inherited from:
SealedTraitDerivation
override def split[T](ctx: SealedTrait[VPackEncoder, T]): VPackEncoder[T]

This must be implemented by the user of Magnolia to construct a Typeclass for 'T', where 'T' is a Sealed Trait or Scala 3 Enum, using the provided type info. E.g. if we are deriving 'Show[T]' typeclasses, and T is an enum 'Suit' (eg with values Diamonds, Clubs, etc), we need to constuct 'Show[Suit]'.

This must be implemented by the user of Magnolia to construct a Typeclass for 'T', where 'T' is a Sealed Trait or Scala 3 Enum, using the provided type info. E.g. if we are deriving 'Show[T]' typeclasses, and T is an enum 'Suit' (eg with values Diamonds, Clubs, etc), we need to constuct 'Show[Suit]'.

This method is called 'split' because it will ''split'' the different possible types of the SealedTrait, and handle each one to finally produce a typeclass capable of handling any possible subtype of the trait.

A useful function for implementing this method is SealedTrait#choose, which can take a value instance and provide information on the specific subtype of the sealedTrait which that value is.

Attributes

Definition Classes
VPackEncoderDerivation -> Derivation
Inherited from:
VPackEncoderDerivation
transparent inline def subtypes[T, SubtypeTuple <: Tuple](m: SumOf[T], idx: Int): List[Subtype[Typeclass, T, _]]

Attributes

Inherited from:
Derivation
transparent inline protected def subtypesFromMirror[A, SubtypeTuple <: Tuple](m: SumOf[A], idx: Int): List[Subtype[Typeclass, A, _]]

Attributes

Inherited from:
SealedTraitDerivation

Implicits

Implicits

implicit val arrayByteEncoder: VPackEncoder[Array[Byte]]
implicit val bigdecimalEncoder: VPackEncoder[BigDecimal]
implicit val bigintEncoder: VPackEncoder[BigInt]
implicit val booleanEncoder: VPackEncoder[Boolean]
implicit val byteEncoder: VPackEncoder[Byte]
implicit val byteVectorEncoder: VPackEncoder[ByteVector]
implicit val contravariance: Contravariant[VPackEncoder]
implicit val dateEncoder: VPackEncoder[Date]
implicit val doubleEncoder: VPackEncoder[Double]
implicit val floatEncoder: VPackEncoder[Float]
implicit val instantEncoder: VPackEncoder[Instant]
implicit val intEncoder: VPackEncoder[Int]
implicit def iterableEncoder[T](implicit e: VPackEncoder[T]): VPackEncoder[Iterable[T]]
implicit def listEncoder[T](implicit e: VPackEncoder[T]): VPackEncoder[List[T]]
implicit val localDateEncoder: VPackEncoder[LocalDate]
implicit val longEncoder: VPackEncoder[Long]
implicit def mapEncoder[K, T](implicit ke: VPackKeyEncoder[K], te: VPackEncoder[T]): VPackEncoder[Map[K, T]]
implicit def optionEncoder[T](implicit e: VPackEncoder[T]): VPackEncoder[Option[T]]
implicit def seqEncoder[T](implicit e: VPackEncoder[T]): VPackEncoder[Seq[T]]
implicit def setEncoder[T](implicit e: VPackEncoder[T]): VPackEncoder[Set[T]]
implicit val shortEncoder: VPackEncoder[Short]
implicit val stringEncoder: VPackEncoder[String]
implicit val unitEncoder: VPackEncoder[Unit]
implicit val uriEncoder: VPackEncoder[URI]
implicit val urlEncoder: VPackEncoder[URL]
implicit val uuidEncoder: VPackEncoder[UUID]
implicit def vectorEncoder[T](implicit e: VPackEncoder[T]): VPackEncoder[Vector[T]]