pub struct MemorySliceSource { /* private fields */ }Expand description
A SliceSource backed by an already-loaded stream — the universal fallback for
formats without native random access (npz/txt/bag today). Slicing is entirely
in-RAM, so open() returns a working handle for every supported format from day one.
Implementations§
Source§impl MemorySliceSource
impl MemorySliceSource
pub fn new(stream: EventStream) -> Self
Trait Implementations§
Source§impl SliceSource for MemorySliceSource
impl SliceSource for MemorySliceSource
fn sensor_size(&self) -> (usize, usize)
fn timestamp_scale_ms(&self) -> f64
Source§fn time_span(&self) -> (i64, i64)
fn time_span(&self) -> (i64, i64)
(t_min, t_max) in microseconds across the whole file; (0, 0) when empty.Source§fn slice_index(&self, i0: usize, i1: usize) -> Result<EventStream, IoError>
fn slice_index(&self, i0: usize, i1: usize) -> Result<EventStream, IoError>
Events whose index lies in
[i0, i1) (clamped to the file).Source§fn slice_time(&self, t0: i64, t1: i64) -> Result<EventStream, IoError>
fn slice_time(&self, t0: i64, t1: i64) -> Result<EventStream, IoError>
Events whose timestamp (µs) lies in the half-open window
[t0, t1).Auto Trait Implementations§
impl Freeze for MemorySliceSource
impl RefUnwindSafe for MemorySliceSource
impl Send for MemorySliceSource
impl Sync for MemorySliceSource
impl Unpin for MemorySliceSource
impl UnsafeUnpin for MemorySliceSource
impl UnwindSafe for MemorySliceSource
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