#[non_exhaustive]pub struct ScanReport {
pub ids: Vec<u8>,
pub garbled: bool,
}Expand description
What a Bus::scan found.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ids: Vec<u8>Motor IDs that answered, ascending.
garbled: boolThe broadcast stage read bytes it could not attribute to any motor — a misaligned buffer, or an aligned frame whose ID byte is out of range.
On a multi-drop bus this is the signature of several motors
answering the unarbitrated broadcast at once: their replies collide
into bytes belonging to neither. (A partly-captured TX echo looks
the same; either way the bus is not silent.) So ids being empty
alongside garbled: true does not mean no motors are present —
it is a strong hint to re-scan polling every ID, which probes each
ID in isolation. (A full scan can still collide where two motors
share one ID — the aftermath of a misused
set_id — since both answer the same probe.)
Trait Implementations§
Source§impl Clone for ScanReport
impl Clone for ScanReport
Source§fn clone(&self) -> ScanReport
fn clone(&self) -> ScanReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScanReport
impl Debug for ScanReport
impl Eq for ScanReport
Source§impl PartialEq for ScanReport
impl PartialEq for ScanReport
impl StructuralPartialEq for ScanReport
Auto Trait Implementations§
impl Freeze for ScanReport
impl RefUnwindSafe for ScanReport
impl Send for ScanReport
impl Sync for ScanReport
impl Unpin for ScanReport
impl UnsafeUnpin for ScanReport
impl UnwindSafe for ScanReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more