Available on
doc
or test
only.Expand description
§encode
modifications
(↑) This is derived work from the
encode
crate,
including the following modifications:
- define a new
Decodable
trait. - replace the
Encoder
trait byIoWrite
. - use
IoError
as the implicit error type. - make
Encodable::encode
return the usize len. - remove the types:
FromError
,InsufficientSpace
. - merge the categories of combinators and encoders.
- use the same combinators for encoding and decoding.
- rename combinators:
BE
toCodecBe
.LE
toCodecLe
.Cond
toCodecIf
.Flags
toCodecFlags
SizeEncoder
toCodecLen
.LengthPrefix
toCodecLenValue
.
- merge
Iter
andSeparated
intoCodecJoin
, with an optional separator. - make
EncodableSize::encoded_size
be a provided method. - make
CodecLenValue
accept a codec for the length. - make doc tests work with
not(alloc)
as well. - support
[i|u]size
forCodec[Be|Le
. - remove
Encodable
impl forResult
. - remove all unnecessary dependencies.
- refactor macros and implementations.
- explain purity as non-mandatory.
- make combinators
must_use
. - make
FmtAdapter
inline. - make constructors const.