Ref.Custom

object Custom
Source
__.scala
class java.lang.Object
trait scala.Matchable
class Any

Member

trait Containers[A]

Custom Containers Setup

This trait customizes generic containers with given Ref type.

Custom.Containers are already mixed with Custom.Data, so the application code usually uses them indirectly when defining data elements.

Generally there is no performance difference when using customized vs. generic containers, just better readability. For example:

 val s: ~[String] = \/
 // is equivalent to
 val s: String.~  = \/

 val o: Opt[String] = \/
 // is equivalent to
 val o: String.Opt  = \/
Source
__.scala
trait Containers[A]

Custom Containers Setup

This trait customizes generic containers with given Ref type.

Custom.Containers are already mixed with Custom.Data, so the application code usually uses them indirectly when defining data elements.

Generally there is no performance difference when using customized vs. generic containers, just better readability. For example:

 val s: ~[String] = \/
 // is equivalent to
 val s: String.~  = \/

 val o: Opt[String] = \/
 // is equivalent to
 val o: String.Opt  = \/
Source
__.scala
abstract class Data[A <: Opaque.Ref, BASE <: Ref](typeName: String)(`evidence$1`: scala.reflect.ClassTag[Ref.Custom.Data.BASE]) extends Ref.Custom.Type[A, Ref.Custom.Data.BASE] with Ref.Custom.Containers[A]
abstract class Data[A <: Opaque.Ref, BASE <: Ref](typeName: String)(`evidence$1`: scala.reflect.ClassTag[Ref.Custom.Data.BASE]) extends Ref.Custom.Type[A, Ref.Custom.Data.BASE] with Ref.Custom.Containers[A]
abstract class Type[A <: Opaque.Ref, BASE <: Ref](val typeName: String)(using ct: scala.reflect.ClassTag[Ref.Custom.Type.BASE]) extends Opaque.Companion[A] with _methods[A, Ref.Custom.Type.BASE]
abstract class Type[A <: Opaque.Ref, BASE <: Ref](val typeName: String)(using ct: scala.reflect.ClassTag[Ref.Custom.Type.BASE]) extends Opaque.Companion[A] with _methods[A, Ref.Custom.Type.BASE]