#[non_exhaustive]pub enum Medium {
Ethernet,
Ip,
Ieee802154,
}Expand description
Type of medium of a network device.
This is #[non_exhaustive] so that media can be added later without breaking
every driver.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ethernet
Ethernet medium. Devices of this type send and receive Ethernet frames.
Ip
IP medium. Devices of this type send and receive IP frames, without an Ethernet header. MAC addresses are not used.
Ieee802154
IEEE 802.15.4 medium. Devices of this type send and receive 802.15.4 MAC frames carrying 6LoWPAN.
Capabilities::max_transmission_unit is the whole MAC frame
without the FCS: 125 for a 127-byte PHY frame with a 2-byte FCS.
Trait Implementations§
impl Copy for Medium
impl Eq for Medium
impl StructuralPartialEq for Medium
Auto Trait Implementations§
impl Freeze for Medium
impl RefUnwindSafe for Medium
impl Send for Medium
impl Sync for Medium
impl Unpin for Medium
impl UnsafeUnpin for Medium
impl UnwindSafe for Medium
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more