pub struct MotionCollector { /* private fields */ }Expand description
Collector for per-interval motion telemetry. It accumulates aggregates of what the robot physically did over a heartbeat interval and, when given a physical scope, counts how many samples fell outside the declared envelope. The physical analogue of the agent behavioral digest.
With scope set to None the digest still reports observed maxima but cannot
judge conformance, so it reports withinEnvelope true with a zero breach
count, mirroring the Python MotionCollector.
Implementations§
Source§impl MotionCollector
impl MotionCollector
Sourcepub fn new(scope: Option<Value>) -> Self
pub fn new(scope: Option<Value>) -> Self
A collector that judges samples against scope (the
credentialSubject.physicalScope object). Pass None to only aggregate.
Sourcepub fn record(&mut self, sample: &MotionSample) -> Result<()>
pub fn record(&mut self, sample: &MotionSample) -> Result<()>
Record a single observed motion sample, updating the running aggregates and (when a scope is set) the breach counts.
Trait Implementations§
Source§impl Clone for MotionCollector
impl Clone for MotionCollector
Source§impl Debug for MotionCollector
impl Debug for MotionCollector
Auto Trait Implementations§
impl Forget for MotionCollector
impl Freeze for MotionCollectorwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
impl Move for MotionCollector
impl RefUnwindSafe for MotionCollector
impl Send for MotionCollector
impl Sync for MotionCollector
impl Unpin for MotionCollector
impl UnsafeUnpin for MotionCollectorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
impl UnwindSafe for MotionCollector
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