HasDefault

object HasDefault extends AutoDerivation[[T] =>> HasDefault[T]]

companion object and derivation object for HasDefault

companion object and derivation object for HasDefault

Companion
class
trait AutoDerivation[[T] =>> HasDefault[T]]
trait Derivation[[T] =>> HasDefault[T]]
trait CommonDerivation[[T] =>> HasDefault[T]]
class Object
trait Matchable
class Any

Type members

Inherited types

type Typeclass[T] = TypeClass[T]
Inherited from
CommonDerivation

Value members

Concrete methods

def join[T](ctx: CaseClass[[T] =>> HasDefault[T], T]): HasDefault[T]

constructs a default for each parameter, using the constructor default (if provided), otherwise using a typeclass-provided default

constructs a default for each parameter, using the constructor default (if provided), otherwise using a typeclass-provided default

override def split[T](ctx: SealedTrait[[T] =>> HasDefault[T], T]): HasDefault[T]

chooses which subtype to delegate to

chooses which subtype to delegate to

Definition Classes
Derivation

Inherited methods

inline def derived[A](using Of[A]): HasDefault[A]
Inherited from
Derivation
inline def derivedMirror[A](using mirror: Of[A]): HasDefault[A]
Inherited from
Derivation
inline def derivedMirrorProduct[A](product: ProductOf[A]): HasDefault[A]
Inherited from
CommonDerivation
inline def derivedMirrorSum[A](sum: SumOf[A]): HasDefault[A]
Inherited from
Derivation
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]]
Inherited from
CommonDerivation
inline def subtypes[T, SubtypeTuple <: Tuple](m: SumOf[T], idx: Int): List[Subtype[Typeclass, T, _]]
Inherited from
Derivation

Givens

Givens

given boolean: HasDefault[Boolean]

oh, no, there is no default Boolean... whatever will we do?

oh, no, there is no default Boolean... whatever will we do?

given int: HasDefault[Int]

default value for ints; 0

default value for ints; 0

given seq[A]: HasDefault[Seq[A]]

default value for sequences; the empty sequence

default value for sequences; the empty sequence

given string: HasDefault[String]

default value for a string; the empty string

default value for a string; the empty string

Inherited givens

given autoDerived: TypeClass[A]
Inherited from
AutoDerivation