macro_rules! packet_filter_switch {
(
$name:ident<$ctx:ty> {
$( $case_name:ident : $t:ty ),*,
}
) => { ... };
}Expand description
Creates an enum which implements PacketFilter by
delegating to other PacketFilter implementations, depending on the enum-variant. It’s
intended that the types created by this macro be used as the type-parameter for an instance of
the Demultiplex type, allowing Demultiplex to support many kinds of PacketFilter, without
the cost of having to box them.
See demux_context!() for an example.