Most types will be encoded without any possibility of error.
The trait is used to provide these implementations.
This is currently not a substitute for implementing a proper TopEncode.
Trait that abstracts away an underlying API for a top-level object deserializer.
The underlying API can provide pre-parsed i64/u64 or pre-bundled boxed slices.
Convenience method, to avoid having to specify type when calling dep_decode.
Especially useful in the macros.
Also checks that the entire slice was used.
The input doesn’t need to be mutable because we are not changing the underlying data.
Adds number to output buffer.
No argument generics here, because we want the executable binary as small as possible.
Smaller types need to be converted to u64 before using this function.
TODO: there might be a quicker version of this using transmute + reverse bytes.