pub struct ScanResults<'w, 'b> { /* private fields */ }Expand description
Where a NetworkDriver puts what it found.
A typed sink rather than a raw TlvWriter, so the encoding stays in this module and a
driver cannot emit a structure the specification does not define. §11.9.7.2 asks for a
particular order — “Results SHOULD be reported in decreasing RSSI order … to maximize the
likelihood that most likely to be reachable elements are included within the size limits of
the response” — which is the driver’s to honour, since only it knows the signal strengths.
Implementations§
Source§impl ScanResults<'_, '_>
impl ScanResults<'_, '_>
Sourcepub fn wifi(&mut self, result: &WiFiScanResult<'_>) -> Result<(), NetworkStatus>
pub fn wifi(&mut self, result: &WiFiScanResult<'_>) -> Result<(), NetworkStatus>
Appends a Wi-Fi result.
Returns NetworkStatus::BoundsExceeded once the response buffer is full, which is
not a failure: §11.9.7.2 says the list “MAY contain a subset of possibilities, to avoid
memory exhaustion on the cluster server and avoid crossing the maximum command response
size supported”.
Sourcepub fn thread(
&mut self,
result: &ThreadScanResult<'_>,
) -> Result<(), NetworkStatus>
pub fn thread( &mut self, result: &ThreadScanResult<'_>, ) -> Result<(), NetworkStatus>
Appends a Thread result.