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§
Sourcetype LinkLayerAddr: Ipv6LinkLayerAddr
type LinkLayerAddr: Ipv6LinkLayerAddr
A link-layer address.
Required Methods§
Sourcefn get_link_layer_addr(
&mut self,
device_id: &Self::DeviceId,
) -> Option<Self::LinkLayerAddr>
fn get_link_layer_addr( &mut self, device_id: &Self::DeviceId, ) -> Option<Self::LinkLayerAddr>
Gets the device’s link-layer address, if the device supports link-layer addressing.
Sourcefn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu)
fn set_link_mtu(&mut self, device_id: &Self::DeviceId, mtu: Mtu)
Sets the link MTU for the device.
Sourcefn with_network_learned_parameters<O, F: FnOnce(&Ipv6NetworkLearnedParameters) -> O>(
&mut self,
device_id: &Self::DeviceId,
cb: F,
) -> O
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.
Sourcefn with_network_learned_parameters_mut<O, F: FnOnce(&mut 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
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.