macro_rules! define_protocol {
(
$(#[$meta:meta])*
name: $name:ident,
transport: $transport:expr,
identify: |$data:ident| $body:expr
) => { ... };
}Expand description
Macro to define a new protocol by implementing the RefractiumProtocol trait.
This macro simplifies the creation of simple protocols that identify themselves by checking a data slice against a condition.