pub struct EventStreamBuilder { /* private fields */ }Expand description
Builds an EventStream one event at a time, dropping events outside the
sensor. The single construction path shared by readers and (future) transforms.
Implementations§
Source§impl EventStreamBuilder
impl EventStreamBuilder
pub fn new(width: usize, height: usize, timestamp_scale_ms: f64) -> Self
pub fn with_capacity( width: usize, height: usize, timestamp_scale_ms: f64, capacity: usize, ) -> Self
Sourcepub fn push(&mut self, x: u16, y: u16, timestamp: i64, polarity: bool) -> bool
pub fn push(&mut self, x: u16, y: u16, timestamp: i64, polarity: bool) -> bool
Appends an event, returning false if it lies outside the sensor and was
dropped. Callers that treat out-of-bounds events as errors inspect the result.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn build(self) -> EventStream
Trait Implementations§
Source§impl Clone for EventStreamBuilder
impl Clone for EventStreamBuilder
Source§fn clone(&self) -> EventStreamBuilder
fn clone(&self) -> EventStreamBuilder
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 moreAuto Trait Implementations§
impl Freeze for EventStreamBuilder
impl RefUnwindSafe for EventStreamBuilder
impl Send for EventStreamBuilder
impl Sync for EventStreamBuilder
impl Unpin for EventStreamBuilder
impl UnsafeUnpin for EventStreamBuilder
impl UnwindSafe for EventStreamBuilder
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