[−][src]Crate ed
ed
is a minimalist crate for deterministic binary encodings.
It provides Encode
and Decode
traits which can be implemented for any
type that can be converted to or from bytes, and implements these traits for
many built-in Rust types. It also provides derive macros so that Encode
and Decode
can be easily derived for structs.
ed
is far simpler than serde
because it does not attempt to create an
abstraction which allows arbitrary kinds of encoding (JSON, MessagePack,
etc.), and instead forces encodings to be decided on by the top-level type
author. It is also significantly faster.
This crate has a focus on determinism (important for cryptographically
hashed types) - so encodings are always big-endian and do not support
floating point numbers or usize
.
Traits
Decode | A trait for values that can be decoded from bytes deterministically. |
Encode | A trait for values that can be encoded into bytes deterministically. |
Terminated | A type is |
Type Definitions
Result | A Result bound to the standard |
Derive Macros
Decode | |
Encode |