3 releases (stable)
| 1.0.1 | Mar 20, 2026 |
|---|---|
| 1.0.0 | Nov 27, 2025 |
| 0.1.0 | Nov 26, 2025 |
#5 in #strict-encoding
619 downloads per month
Used in 11 crates
(via rgb-strict-encoding)
47KB
913 lines
Derivation macros for strict encoding. To learn more about the strict
encoding please check strict_encoding crate.
Derivation macros
Library exports derivation macros #[derive(StrictEncode)],
#[derive(StrictDecode)], which can be added on top of any structure
you'd like to support string encoding (see Example section below).
Encoding/decoding implemented by both of these macros may be configured at
type and individual field level using #[strict_type(...)] attributes.
Attribute
StrictEncode and StrictDecode behavior can be customized with
#[strict_encoding(...)] attribute, which accepts different arguments
depending to which part of the data type it is applied.
Attribute arguments at type declaration level
Derivation macros accept #[strict_encoding()] attribute with the following
arguments:
Strict encoding derivation macros
Derivation macros for strict encoding. To learn more about the strict encoding
please check rgb-strict-encoding crate.
Contributing
Contribution guidelines can be found in CONTRIBUTING
Licensing
The libraries are distributed on the terms of Apache 2.0 opensource license. See LICENCE file for the license details.
Dependencies
~1.5MB
~42K SLoC