pub type BlackholeDeviceId<BT> = BaseDeviceId<BlackholeDevice, BT>;
Expand description
A strong device ID identifying a blackhole device.
This device ID is like DeviceId
but specifically for blackhole devices.
Aliased Type§
struct BlackholeDeviceId<BT> { /* private fields */ }
Implementations
Source§impl<T, BT> BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Sourcepub fn device_state(
&self,
tracker: &OriginTracker,
) -> &IpLinkDeviceStateInner<<T as DeviceStateSpec>::State<BT>, BT>
pub fn device_state( &self, tracker: &OriginTracker, ) -> &IpLinkDeviceStateInner<<T as DeviceStateSpec>::State<BT>, BT>
Returns a reference to the device state.
Requires an OriginTracker to ensure this is being access from the proper context and disallow usage in bindings.
Sourcepub fn external_state(&self) -> &<T as DeviceStateSpec>::External<BT>
pub fn external_state(&self) -> &<T as DeviceStateSpec>::External<BT>
Returns a reference to the external state for the device.
Sourcepub fn bindings_id(&self) -> &<BT as DeviceLayerStateTypes>::DeviceIdentifier
pub fn bindings_id(&self) -> &<BT as DeviceLayerStateTypes>::DeviceIdentifier
Returns the bindings identifier associated with the device.
Sourcepub fn downgrade(&self) -> BaseWeakDeviceId<T, BT>
pub fn downgrade(&self) -> BaseWeakDeviceId<T, BT>
Downgrades the ID to an EthernetWeakDeviceId
.
Trait Implementations
Source§impl<T, BT> Clone for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> Clone for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§fn clone(&self) -> BaseDeviceId<T, BT>
fn clone(&self) -> BaseDeviceId<T, BT>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T, BT> Debug for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> Debug for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§impl<T, BT> DeviceIdentifier for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> DeviceIdentifier for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§fn is_loopback(&self) -> bool
fn is_loopback(&self) -> bool
Returns true if the device is a loopback device.
Source§impl<T, BT> Hash for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> Hash for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§impl<T, BT> Ord for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> Ord for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§fn cmp(&self, other: &BaseDeviceId<T, BT>) -> Ordering
fn cmp(&self, other: &BaseDeviceId<T, BT>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T, BT> PartialEq<BasePrimaryDeviceId<T, BT>> for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> PartialEq<BasePrimaryDeviceId<T, BT>> for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§impl<T, BT> PartialEq<BaseWeakDeviceId<T, BT>> for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> PartialEq<BaseWeakDeviceId<T, BT>> for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§impl<T, BT> PartialEq for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> PartialEq for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§impl<T, BT> PartialOrd for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> PartialOrd for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§impl<T, BT> StrongDeviceIdentifier for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
impl<T, BT> StrongDeviceIdentifier for BaseDeviceId<T, BT>where
T: DeviceStateSpec,
BT: DeviceLayerTypes,
Source§fn downgrade(&self) -> <BaseDeviceId<T, BT> as StrongDeviceIdentifier>::Weak
fn downgrade(&self) -> <BaseDeviceId<T, BT> as StrongDeviceIdentifier>::Weak
Returns a weak ID for this strong ID.