Crate scale_value

Source
Expand description

This crate exposes the Value type and related subtypes, which are used as the runtime representations of SCALE encoded data (much like serde_json::Value is a runtime representation of JSON data).

Value’s can be:

Modules§

scale
Encoding and decoding SCALE bytes into a crate::Value.
serde
Serializing and deserializing a crate::Value into/from other types via serde.
stringify
Converting a crate::Value to or from strings.

Macros§

value
Construct a scale_value::Value

Structs§

BitSequence
This represents a sequence of boolean values, packed into bits.
Location
A struct representing a location to access in a Value.
Value
Value holds a representation of some value that has been decoded, as well as some arbitrary context.
Variant
This represents the value of a specific variant from an enum, and contains the name of the variant, and the named/unnamed values associated with it.

Enums§

Composite
A named or unnamed struct-like, array-like or tuple-like set of values. This is used to represent a range of composite values on their own, or as values for a specific Variant.
Primitive
A “primitive” value (this includes strings).
ValueDef
The underlying shape of a given value.

Traits§

At
This trait allows indexing into Values (and options of Values) using the At::at() function. It’s a little like Rust’s core::ops::Index trait, but adapted so that we can return and work with optionals.