Trait Ipv6DeviceContext

Source
pub trait Ipv6DeviceContext<BC: IpDeviceBindingsContext<Ipv6, Self::DeviceId>>: IpDeviceStateContext<Ipv6, BC> {
    type LinkLayerAddr: Ipv6LinkLayerAddr;

    // Required methods
    fn get_link_layer_addr(
        &mut self,
        device_id: &Self::DeviceId,
    ) -> Option<Self::LinkLayerAddr>;
    fn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu);
    fn with_network_learned_parameters<O, F: FnOnce(&Ipv6NetworkLearnedParameters) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        cb: F,
    ) -> O;
    fn with_network_learned_parameters_mut<O, F: FnOnce(&mut Ipv6NetworkLearnedParameters) -> O>(
        &mut self,
        device_id: &Self::DeviceId,
        cb: F,
    ) -> O;
}
Expand description

The execution context for an IPv6 device.

Required Associated Types§

Source

type LinkLayerAddr: Ipv6LinkLayerAddr

A link-layer address.

Required Methods§

Gets the device’s link-layer address, if the device supports link-layer addressing.

Sets the link MTU for the device.

Source

fn with_network_learned_parameters<O, F: FnOnce(&Ipv6NetworkLearnedParameters) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O

Calls the function with an immutable reference to the retransmit timer.

Source

fn with_network_learned_parameters_mut<O, F: FnOnce(&mut Ipv6NetworkLearnedParameters) -> O>( &mut self, device_id: &Self::DeviceId, cb: F, ) -> O

Calls the function with a mutable reference to the retransmit timer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§