1 unstable release
0.1.0 | Apr 2, 2020 |
---|
#6 in #muta
11KB
287 lines
Muta Fixed Codec Derive
FixedCodec Trait
pub trait FixedCodec: Sized {
fn encode_fixed(&self) -> ProtocolResult<Bytes>;
fn decode_fixed(bytes: Bytes) -> ProtocolResult<Self>;
}
#[derive(RlpFixedCodec)]
Use rlp to derive FixedCodec
trait.
lib.rs
:
Derive macro #[derive(RlpFixedCodec)]
Dependencies
~1.5MB
~35K SLoC