IpRoutingDeviceContext

Trait IpRoutingDeviceContext 

Source
pub trait IpRoutingDeviceContext<I: Ip>: DeviceIdContext<AnyDevice> {
    // Required methods
    fn get_routing_metric(&mut self, device_id: &Self::DeviceId) -> RawMetric;
    fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool;
}
Expand description

Provides access to a device for the purposes of IP routing.

Required Methods§

Source

fn get_routing_metric(&mut self, device_id: &Self::DeviceId) -> RawMetric

Returns the routing metric for the device.

Source

fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool

Returns true if the IP device is enabled.

Implementations on Foreign Types§

Source§

impl<I: Ip, D: StrongDeviceIdentifier> IpRoutingDeviceContext<I> for FakeCoreCtx<FakeIpRoutingContext<D>, (), D>
where Self: DeviceIdContext<AnyDevice, DeviceId = D>,

Source§

fn get_routing_metric(&mut self, _device_id: &Self::DeviceId) -> RawMetric

Source§

fn is_ip_device_enabled(&mut self, device_id: &Self::DeviceId) -> bool

Implementors§