3 releases
0.2.2 | Sep 2, 2020 |
---|---|
0.2.1 | Sep 2, 2020 |
0.2.0 | Apr 15, 2020 |
#3 in #muta
50 downloads per month
12KB
278 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