pub trait Link {
Show 17 methods
// Required methods
fn get_channel(&self) -> ChannelIndex;
fn set_channel(&self, index: ChannelIndex) -> Result;
fn link_get_counters(&self) -> &MacCounters;
fn get_extended_address(&self) -> &ExtAddress;
fn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress;
fn get_pan_id(&self) -> PanId;
fn set_pan_id(&self, pan_id: PanId) -> Result;
fn get_short_address(&self) -> ShortAddress;
fn link_is_enabled(&self) -> bool;
fn link_set_enabled(&self, enabled: bool) -> Result;
fn link_is_promiscuous(&self) -> bool;
fn link_set_promiscuous(&self, promiscuous: bool) -> Result;
fn is_energy_scan_in_progress(&self) -> bool;
fn is_active_scan_in_progress(&self) -> bool;
fn get_supported_channel_mask(&self) -> ChannelMask ⓘ;
fn start_active_scan<'a, F>(
&self,
channels: ChannelMask,
dwell: Duration,
f: F,
) -> Result
where F: FnMut(Option<&ActiveScanResult>) + 'a;
fn start_energy_scan<'a, F>(
&self,
channels: ChannelMask,
dwell: Duration,
f: F,
) -> Result
where F: FnMut(Option<&EnergyScanResult>) + 'a;
}
Expand description
Methods from the OpenThread “Link” Module.
Required Methods§
Sourcefn get_channel(&self) -> ChannelIndex
fn get_channel(&self) -> ChannelIndex
Functional equivalent of otsys::otLinkGetChannel
.
Sourcefn set_channel(&self, index: ChannelIndex) -> Result
fn set_channel(&self, index: ChannelIndex) -> Result
Functional equivalent of otsys::otLinkSetChannel
.
Sourcefn link_get_counters(&self) -> &MacCounters
fn link_get_counters(&self) -> &MacCounters
Functional equivalent of otsys::otLinkGetCounters
.
Sourcefn get_extended_address(&self) -> &ExtAddress
fn get_extended_address(&self) -> &ExtAddress
Functional equivalent of
otsys::otLinkGetExtendedAddress
.
Sourcefn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress
fn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress
Functional equivalent of
otsys::otLinkGetFactoryAssignedIeeeEui64
.
Sourcefn get_pan_id(&self) -> PanId
fn get_pan_id(&self) -> PanId
Functional equivalent of otsys::otLinkGetPanId
.
Sourcefn set_pan_id(&self, pan_id: PanId) -> Result
fn set_pan_id(&self, pan_id: PanId) -> Result
Functional equivalent of otsys::otLinkSetPanId
.
Sourcefn get_short_address(&self) -> ShortAddress
fn get_short_address(&self) -> ShortAddress
Functional equivalent of otsys::otLinkGetShortAddress
.
Sourcefn link_is_enabled(&self) -> bool
fn link_is_enabled(&self) -> bool
Functional equivalent of otsys::otLinkIsEnabled
.
Sourcefn link_set_enabled(&self, enabled: bool) -> Result
fn link_set_enabled(&self, enabled: bool) -> Result
Functional equivalent of otsys::otLinkSetEnabled
.
Sourcefn link_is_promiscuous(&self) -> bool
fn link_is_promiscuous(&self) -> bool
Functional equivalent of otsys::otLinkIsPromiscuous
.
Sourcefn link_set_promiscuous(&self, promiscuous: bool) -> Result
fn link_set_promiscuous(&self, promiscuous: bool) -> Result
Functional equivalent of
otsys::otLinkSetPromiscuous
.
Sourcefn is_energy_scan_in_progress(&self) -> bool
fn is_energy_scan_in_progress(&self) -> bool
Functional equivalent of
otsys::otLinkIsEnergyScanInProgress
.
Sourcefn is_active_scan_in_progress(&self) -> bool
fn is_active_scan_in_progress(&self) -> bool
Functional equivalent of
otsys::otLinkIsActiveScanInProgress
.
Sourcefn get_supported_channel_mask(&self) -> ChannelMask ⓘ
fn get_supported_channel_mask(&self) -> ChannelMask ⓘ
Functional equivalent of
otsys::otLinkGetSupportedChannelMask
.
Sourcefn start_active_scan<'a, F>(
&self,
channels: ChannelMask,
dwell: Duration,
f: F,
) -> Result
fn start_active_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
Starts an active scan. Functional equivalent of
otsys::otLinkActiveScan
.
The closure will ultimately be executed via
ot::Tasklets::process
.
Sourcefn start_energy_scan<'a, F>(
&self,
channels: ChannelMask,
dwell: Duration,
f: F,
) -> Result
fn start_energy_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
Starts an energy scan. Functional equivalent of
otsys::otLinkEnergyScan
.
The closure will ultimately be executed via
ot::Tasklets::process
.
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.