pub struct DetectionBatch<'a> {
pub camera_id: &'a str,
pub site_id: Option<&'a str>,
pub task_type: &'a str,
pub detections: &'a [DetectionIngest],
pub timestamp: DateTime<Utc>,
}Expand description
One committed batch of detections handed to consumers after it is persisted. Carries the site/camera/task context so a consumer needs no extra lookups (and so the seam is tenant-aware for distributed deployments).
Fields§
§camera_id: &'a str§site_id: Option<&'a str>§task_type: &'a strThe task type that produced this batch (consumers self-select on it; e.g. BakerySense may also inspect it). Part of the stable seam contract.
detections: &'a [DetectionIngest]§timestamp: DateTime<Utc>Worker-supplied capture time (engines that need trustworthy timing use server time instead; time-windowing consumers like BakerySense use this).
Auto Trait Implementations§
impl<'a> Freeze for DetectionBatch<'a>
impl<'a> RefUnwindSafe for DetectionBatch<'a>
impl<'a> Send for DetectionBatch<'a>
impl<'a> Sync for DetectionBatch<'a>
impl<'a> Unpin for DetectionBatch<'a>
impl<'a> UnsafeUnpin for DetectionBatch<'a>
impl<'a> UnwindSafe for DetectionBatch<'a>
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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