macro_rules! icmpv4_dispatch {
(__internal__, $x:ident, $variable:pat => $expression:expr, $typ:ty) => { ... };
($x:ident : raw, $variable:pat => $expression:expr) => { ... };
($x:ident, $variable:pat => $expression:expr) => { ... };
}
Expand description
Dispatches expressions to the type-safe variants of Icmpv4Packet
or
Icmpv4PacketRaw
.
§Usage
icmpv4_dispatch!(packet, p => p.message_mut().foo());
icmpv4_dispatch!(packet: raw, p => p.message_mut().foo());