#[non_exhaustive]pub struct JobEvent<'a> {
pub lane: &'a str,
pub kind: &'a str,
pub outcome: JobOutcome,
pub duration: Duration,
}Expand description
The observer SPI, defined in worklane-core so telemetry integrations can
depend on the contract without the facade. Re-exported here as the worker is
what invokes it.
A finished-job event handed to a JobObserver.
Reported only when the resolution actually took effect — a resolution rejected as stale (the lease was lost and the job will be redelivered) is not reported, so a redelivered job is counted once, when it finally resolves.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lane: &'a strThe lane the job ran on.
kind: &'a strThe job kind.
outcome: JobOutcomeThe terminal outcome.
duration: DurationTime from dispatch start to resolution (handler plus result-store and broker calls). Near zero for an unknown-kind job (no handler runs).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for JobEvent<'a>
impl<'a> RefUnwindSafe for JobEvent<'a>
impl<'a> Send for JobEvent<'a>
impl<'a> Sync for JobEvent<'a>
impl<'a> Unpin for JobEvent<'a>
impl<'a> UnsafeUnpin for JobEvent<'a>
impl<'a> UnwindSafe for JobEvent<'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