Enum pnet_datalink::Channel
[−]
[src]
pub enum Channel { Ethernet(Box<DataLinkSender>, Box<DataLinkReceiver>), PleaseIncludeACatchAllVariantWhenMatchingOnThisEnum, }
A channel for sending and receiving at the data link layer
NOTE: It is important to always include a catch-all variant in match statements using this enum, since new variants may be added. For example:
⚠Be careful when using this code, it's not being tested!
match some_channel { Ethernet(tx, rx) => { /* Handle Ethernet packets */ }, _ => panic!("Unhandled channel type") }
Variants
Ethernet(Box<DataLinkSender>, Box<DataLinkReceiver>)
A datalink channel which sends and receives Ethernet packets
PleaseIncludeACatchAllVariantWhenMatchingOnThisEnum
This variant should never be used
Including it allows new variants to be added to Channel
without breaking existing code.