Skip to main content

FilteredChannelRows

Struct FilteredChannelRows 

Source
pub(crate) struct FilteredChannelRows {
    pub(crate) groups: Vec<Vec<FileSpan>>,
    pub(crate) slices: VecDeque<(usize, i64, i64)>,
    pub(crate) calibrations: Arc<Vec<(CalibrationSpec, String)>>,
    pub(crate) filter: ExportFilter<FilterInputRow>,
    pub(crate) start_ns: i64,
    pub(crate) end_ns: i64,
    pub(crate) finished: bool,
}
Expand description

Reads one channel over the export range plus lead-in and settling margins and runs it through the zero-phase filter pipeline, one merge slice at a time.

Rows come out in time order through Self::next_batch, only those inside the export range, each with its filtered calibrated value. Memory stays bounded by one slice plus the filter’s backward-pass block (see filters::ExportFilter), and the batch handed back.

Fields§

§groups: Vec<Vec<FileSpan>>

File groups of the channel’s day folders, in time order.

§slices: VecDeque<(usize, i64, i64)>

(group index, from_ns, to_ns) slices still to read.

§calibrations: Arc<Vec<(CalibrationSpec, String)>>

Calibrations of the rows read so far. Rows refer to them by index rather than each holding a reference count, which the reader and CSV threads would otherwise update for every row.

§filter: ExportFilter<FilterInputRow>§start_ns: i64§end_ns: i64§finished: bool

Implementations§

Source§

impl FilteredChannelRows

Source

pub(crate) fn new( root: &Path, asset: u32, channel: u8, start: DateTime<Utc>, end: DateTime<Utc>, settings: &ChannelFilterSettings, ) -> Result<Self>

Lists the slices to read.

§Errors

Returns an error if an existing day folder cannot be listed.

Source

pub(crate) fn next_batch( &mut self, ) -> Option<(Vec<FilteredRow<FilterInputRow>>, Arc<Vec<(CalibrationSpec, String)>>)>

Reads the next slice and returns the rows it completes; None when done.

§Returns

The rows, and the table their calibration indices refer to.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more