pub trait Ip6 {
Show 19 methods
// Required methods
fn ip6_send(&self, message: OtMessageBox<'_>) -> Result;
fn ip6_send_data(&self, data: &[u8]) -> Result;
fn ip6_send_data_direct(&self, data: &[u8]) -> Result;
fn ip6_is_enabled(&self) -> bool;
fn ip6_set_enabled(&self, enabled: bool) -> Result;
fn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result;
fn ip6_remove_unicast_address(&self, addr: &Ip6Address) -> Result;
fn ip6_join_multicast_group(&self, addr: &Ip6Address) -> Result;
fn ip6_leave_multicast_group(&self, addr: &Ip6Address) -> Result;
fn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>)
where F: FnMut(OtMessageBox<'_>) + 'a;
fn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>)
where F: for<'r> FnMut(Ip6AddressInfo<'r>, bool) + 'a;
fn ip6_is_slaac_enabled(&self) -> bool;
fn ip6_set_slaac_enabled(&self, enabled: bool);
fn icmp6_get_echo_mode(&self) -> Icmp6EchoMode;
fn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode);
fn ip6_set_receive_filter_enabled(&self, enabled: bool);
fn ip6_is_receive_filter_enabled(&self) -> bool;
fn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters;
fn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_> ⓘ;
}Expand description
Methods from the OpenThread “IPv6” Module.
Required Methods§
Sourcefn ip6_send(&self, message: OtMessageBox<'_>) -> Result
fn ip6_send(&self, message: OtMessageBox<'_>) -> Result
Functional equivalent of otsys::otIp6Send.
Sourcefn ip6_send_data(&self, data: &[u8]) -> Result
fn ip6_send_data(&self, data: &[u8]) -> Result
Similar to [ip6_send()], but takes a byte slice instead
of an OtMessageBox.
Sourcefn ip6_send_data_direct(&self, data: &[u8]) -> Result
fn ip6_send_data_direct(&self, data: &[u8]) -> Result
Similar to [ip6_send_data()], but sends the packet without layer-2 security.
Sourcefn ip6_is_enabled(&self) -> bool
fn ip6_is_enabled(&self) -> bool
Functional equivalent of otsys::otIp6IsEnabled.
Sourcefn ip6_set_enabled(&self, enabled: bool) -> Result
fn ip6_set_enabled(&self, enabled: bool) -> Result
Functional equivalent of otsys::otIp6SetEnabled.
Sourcefn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result
fn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result
Functional equivalent of
otsys::otIp6AddUnicastAddress.
Sourcefn ip6_remove_unicast_address(&self, addr: &Ip6Address) -> Result
fn ip6_remove_unicast_address(&self, addr: &Ip6Address) -> Result
Functional equivalent of
otsys::otIp6RemoveUnicastAddress.
Sourcefn ip6_join_multicast_group(&self, addr: &Ip6Address) -> Result
fn ip6_join_multicast_group(&self, addr: &Ip6Address) -> Result
Functional equivalent of
otsys::otIp6SubscribeMulticastAddress.
Sourcefn ip6_leave_multicast_group(&self, addr: &Ip6Address) -> Result
fn ip6_leave_multicast_group(&self, addr: &Ip6Address) -> Result
Functional equivalent of
otsys::otIp6UnsubscribeMulticastAddress.
Sourcefn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>)where
F: FnMut(OtMessageBox<'_>) + 'a,
fn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>)where
F: FnMut(OtMessageBox<'_>) + 'a,
Sets the IPv6 receive callback closure. Functional equivalent of
otsys::otIp6SetReceiveCallback.
The closure will ultimately be executed via
ot::Tasklets::process.
Sourcefn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>)
fn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>)
Sets the IPv6 address callback closure. Functional equivalent of
otsys::otIp6SetAddressCallback.
The closure takes two arguments:
- An instance of
ot::Ip6AddressInfo. - A
boolindicating if the address is being added (true) or removed (false).
The closure will ultimately be executed via
ot::Tasklets::process.
Sourcefn ip6_is_slaac_enabled(&self) -> bool
fn ip6_is_slaac_enabled(&self) -> bool
Functional equivalent of otsys::otIp6IsSlaacEnabled.
Sourcefn ip6_set_slaac_enabled(&self, enabled: bool)
fn ip6_set_slaac_enabled(&self, enabled: bool)
Functional equivalent of
otsys::otIp6SetSlaacEnabled.
Sourcefn icmp6_get_echo_mode(&self) -> Icmp6EchoMode
fn icmp6_get_echo_mode(&self) -> Icmp6EchoMode
Functional equivalent of
otsys::otIcmp6GetEchoMode.
Sourcefn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode)
fn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode)
Functional equivalent of
otsys::otIcmp6SetEchoMode.
Sourcefn ip6_set_receive_filter_enabled(&self, enabled: bool)
fn ip6_set_receive_filter_enabled(&self, enabled: bool)
Functional equivalent of
otsys::otIp6SetReceiveFilterEnabled.
Sourcefn ip6_is_receive_filter_enabled(&self) -> bool
fn ip6_is_receive_filter_enabled(&self) -> bool
Functional equivalent of
otsys::otIp6IsReceiveFilterEnabled.
Sourcefn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters
fn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters
Functional equivalent of
otsys::otIp6GetBorderRoutingCounters.
Sourcefn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_> ⓘ
fn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_> ⓘ
Functional equivalent of
otsys::otIp6GetUnicastAddresses.
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.