Crate maelstrom_macro
source ·Macros§
- Derive a trait for some type in a different module (or crate) than the one where the definition is. The orphan rule still applies.
Attribute Macros§
- This macro can be applied to a
struct
or anenum
and it will save the tokens of the definition inside amacro_rules
macro named<name>_pocket_definition
. This can then be used to derive stuff for it using theremote_derive!
macro.
Derive Macros§
- Derives an implementation for the
maelstrom_util::config::Config
trait. - Derives an implementation of
maelstrom_client_base::proto_buf_conv::IntoProtoBuf
- Derives useful things on the generated protobuf types. This macro is applied to all the generated protobuf types in the
build.rs
file. - Derives an implementation of
maelstrom_client_base::proto_buf_conv::TryFromProtoBuf