pub enum Medium {
Ethernet,
Ip,
Ieee802154,
}
Expand description
Type of medium of a device.
Variants
Ethernet
Ethernet medium. Devices of this type send and receive Ethernet frames, and interfaces using it must do neighbor discovery via ARP or NDISC.
Examples of devices of this type are Ethernet, WiFi (802.11), Linux tap
, and VPNs in tap (layer 2) mode.
Ip
IP medium. Devices of this type send and receive IP frames, without an Ethernet header. MAC addresses are not used, and no neighbor discovery (ARP, NDISC) is done.
Examples of devices of this type are the Linux tun
, PPP interfaces, VPNs in tun (layer 3) mode.
Ieee802154
Trait Implementations
impl Copy for Medium
impl Eq for Medium
impl StructuralEq for Medium
impl StructuralPartialEq for Medium
Auto Trait Implementations
impl RefUnwindSafe for Medium
impl Send for Medium
impl Sync for Medium
impl Unpin for Medium
impl UnwindSafe for Medium
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more