Data

scalus.builtin.Data
See theData companion class
object Data extends DataApi

Attributes

Companion
class
Graph
Supertypes
trait Sum
trait Mirror
trait DataApi
class Object
trait Matchable
class Any
Show all
Self type
Data.type

Members list

Type members

Classlikes

case class B(value: ByteString) extends Data

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Data
class Object
trait Matchable
class Any
Show all
case class Constr(constr: Long, args: List[Data]) extends Data

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Data
class Object
trait Matchable
class Any
Show all
case class I(value: BigInt) extends Data

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Data
class Object
trait Matchable
class Any
Show all
case class List(values: List[Data]) extends Data

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Data
class Object
trait Matchable
class Any
Show all
case class Map(values: List[(Data, Data)]) extends Data

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Data
class Object
trait Matchable
class Any
Show all

Types

type FromData[A] = Data => A
type ToData[A] = A => Data

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

inline def fromData[A](inline data: Data)(using inline ev: () => A): A

Inherited methods

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

Inherited from:
DataApi
def fromCbor(is: InputStream): Data

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

Inherited from:
DataApi
def fromCbor(bytes: Array[Byte]): Data

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

Inherited from:
DataApi
def fromJson(json: String): Data

Decode a Data value from JSON

Decode a Data value from JSON

Attributes

Inherited from:
DataApi
def toJson(data: Data, indent: Int): String

Encode a Data value to JSON

Encode a Data value to JSON

Attributes

Inherited from:
DataApi

Concrete fields

val unit: Constr

Extensions

Extensions

extension [A](a: A)
inline def toData: Data
extension (inline data: Data)
inline def to[A](using inline ev: () => A): A

Inherited extensions

extension [A <: Data](a: A)
inline def toJson: String

Encode a Data value to JSON

Encode a Data value to JSON

Attributes

Inherited from:
DataApi
extension [A <: Data](a: A)(implicit evidence$1: Writer[A])
inline def toJsonIndented: String

Encode a Data value to indented JSON

Encode a Data value to indented JSON

Attributes

Inherited from:
DataApi
extension [A <: Data](a: A)
def toCbor: Array[Byte]

Encode a Data value to CBOR.

Encode a Data value to CBOR.

Attributes

Inherited from:
DataApi

Encode a Data value to CBOR ByteString

Encode a Data value to CBOR ByteString

Attributes

Inherited from:
DataApi
extension (inline data: Data)
inline def field[A](inline expr: A => Any): Data

Attributes

Inherited from:
DataApi
inline def toB: ByteString

Attributes

Inherited from:
DataApi
inline def toBigInt: BigInt

Attributes

Inherited from:
DataApi
inline def toByteString: ByteString

Attributes

Inherited from:
DataApi
inline def toConstr: Pair[BigInt, List[Data]]

Attributes

Inherited from:
DataApi
inline def toI: BigInt

Attributes

Inherited from:
DataApi
inline def toList: List[Data]

Attributes

Inherited from:
DataApi
inline def toMap: List[Pair[Data, Data]]

Attributes

Inherited from:
DataApi