Data

scalus.builtin.Data
See theData companion class
object Data

Attributes

Companion
class
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
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

Inherited classlikes

object dataCborDecoder extends Decoder[Data]

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

Inherited from:
DataApi (hidden)
Supertypes
trait Decoder[Data]
class Object
trait Matchable
class Any
object dataCborEncoder extends Encoder[Data]

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

Inherited from:
DataApi (hidden)
Supertypes
trait Encoder[Data]
class Object
trait Matchable
class Any

Types

type FromData[A] = FromData[A]
type ToData[A] = ToData[A]

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: FromData[A]): A

Inherited methods

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

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

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

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

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

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

Decode a Data value from JSON

Decode a Data value from JSON

Attributes

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

Encode a Data value to JSON

Encode a Data value to JSON

Attributes

Inherited from:
DataApi (hidden)

Concrete fields

val unit: Data

Givens

Inherited givens

given DataReadWriter: ReadWriter[Data]

JSON ReadWriter for the Data type.

JSON ReadWriter for the Data type.

Attributes

Inherited from:
DataApi (hidden)

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

Inherited from:
DataApi (hidden)

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

Inherited from:
DataApi (hidden)

Extensions

Extensions

extension [A](a: A)
inline def toData: Data
extension (inline data: Data)
inline def to[A](using inline ev: FromData[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 (hidden)
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 (hidden)
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 (hidden)

Encode a Data value to CBOR ByteString

Encode a Data value to CBOR ByteString

Attributes

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

Attributes

Inherited from:
DataApi (hidden)
inline def toB: ByteString

Attributes

Inherited from:
DataApi (hidden)
inline def toBigInt: BigInt

Attributes

Inherited from:
DataApi (hidden)
inline def toByteString: ByteString

Attributes

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

Attributes

Inherited from:
DataApi (hidden)
inline def toI: BigInt

Attributes

Inherited from:
DataApi (hidden)
inline def toList: List[Data]

Attributes

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

Attributes

Inherited from:
DataApi (hidden)
extension (self: Data)

Attributes

Inherited from:
DataApi (hidden)