Enum pnet::datalink::Channel
[−]
[src]
pub enum Channel { Ethernet(Box<EthernetDataLinkSender>, Box<EthernetDataLinkReceiver>), 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:
match some_channel { Ethernet(tx, rx) => { /* Handle Ethernet packets */ }, _ => panic!("Unhandled channel type") }
Variants
Ethernet(Box<EthernetDataLinkSender>, Box<EthernetDataLinkReceiver>)
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.