Crate scale_encode
source ·Expand description
scale-encode
builds on parity-scale-codec
. parity-scale-codec
provides an Encode
trait
which allows types to SCALE encode themselves with no external information. scale-encode
provides an
EncodeAsType
trait which allows types to decide how to encode themselves based on the desired
target type.
Structs
A cheaply clonable opaque context which allows us to track the current
location into a type that we’re trying to encode, to aid in
error reporting.
An error produced while attempting to encode some type.
Enums
Traits
This trait signals that some static type can possibly be SCALE encoded given some
type_id
and PortableRegistry
which dictates the expected encoding. A Context
is also passed around, which is used internally to improve error reporting. Implementations
should use the Context::at
method to indicate the current location if they would like
it to show up in error output.