The Out type parameter is an HList type whose length is the number of fields of T. Its elements correspond
to the fields of T, in their original order. It is made of None.type (no default value for this field) and
Some[...] (default value available for this field, with ... the type of the field). Note that None.type and
Some[...] are more precise than simply Option[...], so that the availability of default values can be used
in type level calculations.
The apply method returns an HList of type Out, with None elements corresponding to no default value available,
and Some(defaultValue) to default value available for the corresponding fields.
Use like
caseclass CC(i: Int, s: String = "b")
val default = Default[CC]
// default.Out is None.type :: Some[String] :: HNil// default() returns// None :: Some("b") :: HNil,// typed as default.Out
Provides default values of case class-like types.
The
Out
type parameter is an HList type whose length is the number of fields ofT
. Its elements correspond to the fields ofT
, in their original order. It is made ofNone.type
(no default value for this field) andSome[...]
(default value available for this field, with...
the type of the field). Note thatNone.type
andSome[...]
are more precise than simplyOption[...]
, so that the availability of default values can be used in type level calculations.The
apply
method returns an HList of typeOut
, withNone
elements corresponding to no default value available, andSome(defaultValue)
to default value available for the corresponding fields.Use like