Skip to main content

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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§