Skip to main content

Crate scale_serialization

Crate scale_serialization 

Source
Expand description

§Scales

Dynamic SCALE Serialization using scale-info type information.

Re-exports§

pub use error::Error;
pub use registry::Registry;
pub use registry::TypeDef;
pub use registry::TypeId;

Modules§

compress
error
registry

Structs§

Cursor
A zero-copy cursor over SCALE-encoded bytes that yields Values while advancing through the data.
FieldIter
Iterator over named fields of a SCALE-encoded struct.
SeqIter
Iterator over elements of a SCALE-encoded sequence.
Serializer
A serializer that encodes types to SCALE with the option to coerce the output to an equivalent representation given by some type information.
TupleIter
Iterator over elements of a SCALE-encoded tuple.
Value
A container for SCALE encoded data that can serialize types directly with the help of a type registry and without using an intermediate representation.

Enums§

JsonValue
Represents any valid JSON value.

Functions§

from_text
Parse a text-encoded string back into SCALE bytes, guided by the type registry.
to_bytes
SCALE-encode a value into an existing buffer.
to_bytes_from_iter
SCALE-encode a JSON-like key-value iterator into a buffer using type info.
to_bytes_with_info
SCALE-encode a value into a buffer, using type info to coerce representations.
to_text
Format a Value as a compact, URL-safe text string.
to_vec
SCALE-encode a value into a new Vec<u8>.
to_vec_from_iter
Like to_bytes_from_iter but allocates and returns a Vec<u8>.
to_vec_with_info
SCALE-encode a value into a new Vec<u8>, using type info to coerce representations.