#crypto #encodable #decodable #tlv #fields #set #simple-tlv

macro no-std simple-tlv_derive

Procedural macros to derive Decodable and Encodable from simple-tlv

1 unstable release

0.1.0 Feb 19, 2021

#8 in #encodable

27 downloads per month
Used in simple-tlv

Apache-2.0 OR MIT

258 lines


Encoding and decoding of SIMPLE-TLV as described in ISO 7816-4, without allocations.

Follows the approach taken in der.


simple-tlv is licensed under either of Apache License, Version 2.0 or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


Custom derive support for the simple-tlv crate

With #[tlv(slice)] set, Encodable should work for fields implementing AsRef<[u8]>, and Decodable should work for fields implementing TryFrom<[u8]>, even if the field is not Decodable or Encodable.


~36K SLoC