Skip to main content

BatchEntry

Struct BatchEntry 

Source
pub struct BatchEntry {
    pub feed_id: FeedId,
    pub frame: FrameEnvelope,
    pub view: ViewSnapshot,
    pub output: Option<StageOutput>,
}
Expand description

An entry in a batch, passed to BatchProcessor::process.

Each entry represents one frame from one feed. The processor reads frame (and optionally view and feed_id) then writes the per-item result into output.

§Contract

After BatchProcessor::process returns Ok(()), every entry’s output should be Some(StageOutput). Entries left as None are treated as if the processor returned StageOutput::empty() for that item.

Fields§

§feed_id: FeedId

The feed that submitted this frame.

§frame: FrameEnvelope

The video frame to process.

FrameEnvelope is Arc-backed — zero-copy reference, cheap to clone. Use frame.require_host_data() to obtain host-readable bytes (zero-copy for host frames, cached materialization for device frames), or frame.host_data() when host residency is guaranteed.

§view: ViewSnapshot

View-state snapshot at the time of this frame.

Processors may use this to skip inference during rapid camera movement or adapt behavior based on camera stability.

§output: Option<StageOutput>

Slot for the processor to write its per-item output.

Must be set to Some(...) for each successfully processed item. Any StageOutput variant is valid — detections, scene features, signals, or typed artifacts for downstream consumption.

Auto Trait Implementations§

Blanket Implementations§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.