Crate solders_macros
source ·Expand description
A collection of attribute macros to reduce boilerplate in the solders project.
These macros make some very specific assumptions about the structs they’re applied to, so they’re unlikely to be useful for other projects.
Attribute Macros
- Add
__bytes__
,__str__
,__repr__
and__reduce__
,to_json
andfrom_json
using theCommonMethods
trait. - Add
__bytes__
,__str__
,__repr__
and__reduce__
using theCommonMethodsCore
trait. - Add
__bytes__
,__str__
,__repr__
,__reduce__
,to_json
,from_json
,from_bytes
and__richcmp__
using theCommonMethodsRpcResp
trait. - Add mappings to and from another enum that has the exact same fields.
- Add a
__hash__
to the impl using thePyHash
trait. - Add a
__richcmp__
to the impl using theRichcmpEqualityOnly
trait. - Add a
__richcmp__
to the impl using theRichcmpFull
trait. - Add a
__richcmp__
to the impl using theRichcmpSigner
trait. - Add an
id
getter to an RPC request object.
Derive Macros
- Impl IntoPy
for an ADT where each variant is a newtype.