← ZIO Prelude docs

Id

zio.prelude.IdExports.Id
object Id extends NewtypeF

Attributes

Source
Id.scala
Graph
Supertypes
class NewtypeF
trait instance.NewtypeF
class Object
trait Matchable
class Any
Self type
Id.type

Members list

Type members

Inherited types

type Type[+A] = this.newtypeF.Type[A]

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala

Value members

Inherited methods

def apply[A](value: A): Type[A]

Converts an instance of the underlying type to an instance of the newtype.

Converts an instance of the underlying type to an instance of the newtype.

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala
def unapply[A](value: newtypeF.Type[A]): Some[A]

Allows pattern matching on newtype instances to convert them back to instances of the underlying type.

Allows pattern matching on newtype instances to convert them back to instances of the underlying type.

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala
def unwrap[A](value: newtypeF.Type[A]): A

Converts an instance of the newtype back to an instance of the underlying type.

Converts an instance of the newtype back to an instance of the underlying type.

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala
def unwrapAll[F[_], A](value: F[newtypeF.Type[A]]): F[A]

Converts an instance of a type parameterized on the newtype back to an instance of a type parameterized on the underlying type. For example, this could be used to convert a list of instances of the newtype back to a list of instances of the underlying type.

Converts an instance of a type parameterized on the newtype back to an instance of a type parameterized on the underlying type. For example, this could be used to convert a list of instances of the newtype back to a list of instances of the underlying type.

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala
def wrap[A](value: A): Type[A]

Converts an instance of the underlying type to an instance of the newtype.

Converts an instance of the underlying type to an instance of the newtype.

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala
def wrapAll[F[_], A](value: F[A]): F[this.newtypeF.Type[A]]

Converts an instance of a type parameterized on the underlying type to an instance of a type parameterized on the newtype. For example, this could be used to convert a list of instances of the underlying type to a list of instances of the newtype.

Converts an instance of a type parameterized on the underlying type to an instance of a type parameterized on the newtype. For example, this could be used to convert a list of instances of the underlying type to a list of instances of the newtype.

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala

Inherited fields

val newtypeF: instance.NewtypeF

Attributes

Inherited from:
NewtypeF
Source
NewtypeModuleF.scala