pub struct DatEventSink { /* private fields */ }Expand description
Writes a Prophesee .dat CD recording a window at a time — the inverse of read_dat.
The % header and the event-type/size pair are written on the first non-empty append, because
the header carries % Width/% Height and those come from the first stream’s sensor size.
After that every append is a run of 8-byte records with nothing to fix up, so the file is
readable at any point.
Timestamps are u32 microseconds, which is the format’s own width: it wraps after ~71 minutes
and the format offers no high half, so a recording longer than that is rejected rather than
silently wrapped.
Implementations§
Trait Implementations§
Source§impl EventSink for DatEventSink
impl EventSink for DatEventSink
Source§fn append(&mut self, stream: &EventStream) -> Result<(), IoError>
fn append(&mut self, stream: &EventStream) -> Result<(), IoError>
Appends one window’s events. Empty windows are a no-op. The first non-empty window fixes
the sensor size and time base for the whole file.
Auto Trait Implementations§
impl Freeze for DatEventSink
impl RefUnwindSafe for DatEventSink
impl Send for DatEventSink
impl Sync for DatEventSink
impl Unpin for DatEventSink
impl UnsafeUnpin for DatEventSink
impl UnwindSafe for DatEventSink
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more