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§
- common_
methods - Add
__bytes__,__str__,__repr__and__reduce__,to_jsonandfrom_jsonusing theCommonMethodstrait. - common_
methods_ core - Add
__bytes__,__str__,__repr__and__reduce__using theCommonMethodsCoretrait. - common_
methods_ rpc_ resp - Add
__bytes__,__str__,__repr__,__reduce__,to_json,from_json,from_bytesand__richcmp__using theCommonMethodsRpcResptrait. - enum_
original_ mapping - Add mappings to and from another enum that has the exact same fields.
- pyhash
- Add a
__hash__to the impl using thePyHashtrait. - richcmp_
eq_ only - Add a
__richcmp__to the impl using theRichcmpEqualityOnlytrait. - richcmp_
full - Add a
__richcmp__to the impl using theRichcmpFulltrait. - richcmp_
signer - Add a
__richcmp__to the impl using theRichcmpSignertrait. - rpc_
id_ getter - Add an
idgetter to an RPC request object.
Derive Macros§
- Enum
Into Py - Impl IntoPy
for an ADT where each variant is a newtype.