New type with Repr
as representation type and operations provided by Ops
.
New type with Repr
as representation type and operations provided by Ops
.
Values of the newtype will not add any additional boxing beyond what's required for values of the representation type to conform to Any. In practice this means that value types will receive their standard Scala AnyVal boxing and reference types will be unboxed.
Creates a value of the newtype given a value of its representation type.
Implicit conversion of newtype to Ops
type for the selection of Ops
newtype operations.
Implicit conversion of newtype to Ops
type for the selection of Ops
newtype operations.
The implicit conversion Repr => Ops
would typically be provided by publishing the companion
object of the Ops
type as an implicit value.