DataApi

scalus.builtin.DataApi
trait DataApi

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Data

Members list

Value members

Concrete methods

def fromCbor(bytes: Array[Byte]): Data

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

def fromCbor(is: InputStream): Data

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

def fromJson(json: String): Data

Decode a Data value from JSON

Decode a Data value from JSON

Attributes

def toJson(data: Data, indent: Int): String

Encode a Data value to JSON

Encode a Data value to JSON

Attributes

Extensions

Extensions

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

Encode a Data value to JSON

Encode a Data value to JSON

Attributes

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

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

Encode a Data value to CBOR.

Encode a Data value to CBOR.

Attributes

Encode a Data value to CBOR ByteString

Encode a Data value to CBOR ByteString

Attributes

extension (inline data: Data)
inline def field[A](inline expr: A => Any): Data
inline def toB: ByteString
inline def toBigInt: BigInt
inline def toByteString: ByteString
inline def toConstr: Pair[BigInt, List[Data]]
inline def toI: BigInt
inline def toList: List[Data]
inline def toMap: List[Pair[Data, Data]]