Overview
Wrapper for types implementing Serialize
/Deserialize
to implement
Encode
/Decode
automatically.
âš The Error
type exposed by this crate is meant to disappear if/when parity-scale-codec
's
Error
implements Display
unconditionally.
Example
extern crate alloc;
use String;
use ;
use ;
use Wrap;
let original = Foo ;
let serialized = Wrap.encode;
let Wrap = decode.unwrap;
assert_eq!;
Conformance
âš Option<bool>
is serialized as a single byte according to the SCALE encoding, which differs
from the result of Encode::encode
-- Encode
expects OptionBool
to be used instead.
Features
no_std
is supported by disabling default features.
std
: Support forstd
. It is enabled by default. âš It must be enabled if theserde/std
feature is enabled by any crate in the dependency tree.
Contribute
All contributions shall be licensed under the zlib license.
Related projects
- parity-scale-codec: Reference Rust implementation
- serde-scale: SCALE encoding with
serde