pub struct TrajectoryBuffer { /* private fields */ }Expand description
Ring buffer for trajectory storage
Implementations§
Source§impl TrajectoryBuffer
impl TrajectoryBuffer
Sourcepub fn push(&mut self, trajectory: Trajectory)
pub fn push(&mut self, trajectory: Trajectory)
Push a new trajectory
Sourcepub fn trajectories(&self) -> &[Trajectory]
pub fn trajectories(&self) -> &[Trajectory]
Get current buffer contents
Sourcepub fn drain(&mut self) -> Vec<Trajectory>
pub fn drain(&mut self) -> Vec<Trajectory>
Drain all trajectories (returns ownership, clears buffer)
Sourcepub fn stats(&self) -> &TrajectoryStats
pub fn stats(&self) -> &TrajectoryStats
Get statistics
Sourcepub fn total_count(&self) -> u64
pub fn total_count(&self) -> u64
Get total count (may exceed capacity)
Sourcepub fn high_quality(&self, threshold: f32) -> Vec<&Trajectory>
pub fn high_quality(&self, threshold: f32) -> Vec<&Trajectory>
Get high-quality trajectories (quality > threshold)
Sourcepub fn by_operator(&self, op_type: u8) -> Vec<&Trajectory>
pub fn by_operator(&self, op_type: u8) -> Vec<&Trajectory>
Get trajectories for a specific operator type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrajectoryBuffer
impl RefUnwindSafe for TrajectoryBuffer
impl Send for TrajectoryBuffer
impl Sync for TrajectoryBuffer
impl Unpin for TrajectoryBuffer
impl UnsafeUnpin for TrajectoryBuffer
impl UnwindSafe for TrajectoryBuffer
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