#derive #macro #rlp

macro rlp-derive

Derive macro for #[derive(RlpEncodable, RlpDecodable)]

1 unstable release

0.1.0 Feb 13, 2020

#668 in Procedural macros

Download history 5533/week @ 2022-01-08 5395/week @ 2022-01-15 5095/week @ 2022-01-22 4942/week @ 2022-01-29 4831/week @ 2022-02-05 5747/week @ 2022-02-12 5961/week @ 2022-02-19 6434/week @ 2022-02-26 6674/week @ 2022-03-05 7100/week @ 2022-03-12 8499/week @ 2022-03-19 15677/week @ 2022-03-26 14788/week @ 2022-04-02 11247/week @ 2022-04-09 9888/week @ 2022-04-16 5216/week @ 2022-04-23

44,433 downloads per month
Used in 52 crates (2 directly)

MIT/Apache

10KB
255 lines


lib.rs:

Derive macro for #[derive(RlpEncodable, RlpDecodable)].

For example of usage see ./tests/rlp.rs.

This library also supports up to 1 #[rlp(default)] in a struct, which is similar to #[serde(default)] with the caveat that we use the Default value if the field deserialization fails, as we don't serialize field names and there is no way to tell if it is present or not.

Dependencies

~255–670KB
~17K SLoC