pub trait Ipv6DeviceContext<BC: IpDeviceBindingsContext<Ipv6, Self::DeviceId>>: IpDeviceStateContext<Ipv6, BC> {
type LinkLayerAddr: AsRef<[u8]>;
// Required methods
fn get_link_layer_addr_bytes(
&mut self,
device_id: &Self::DeviceId,
) -> Option<Self::LinkLayerAddr>;
fn get_eui64_iid(&mut self, device_id: &Self::DeviceId) -> Option<[u8; 8]>;
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: AsRef<[u8]>
type LinkLayerAddr: AsRef<[u8]>
A link-layer address.
Required Methods§
Sourcefn get_link_layer_addr_bytes(
&mut self,
device_id: &Self::DeviceId,
) -> Option<Self::LinkLayerAddr>
fn get_link_layer_addr_bytes( &mut self, device_id: &Self::DeviceId, ) -> Option<Self::LinkLayerAddr>
Gets the device’s link-layer address bytes, if the device supports link-layer addressing.
Sourcefn get_eui64_iid(&mut self, device_id: &Self::DeviceId) -> Option<[u8; 8]>
fn get_eui64_iid(&mut self, device_id: &Self::DeviceId) -> Option<[u8; 8]>
Gets the device’s EUI-64 based interface identifier.
A None
value indicates the device does not have an EUI-64 based
interface identifier.
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.