#[non_exhaustive]pub struct CaptureFailure<'a> { /* private fields */ }Expand description
Details of a terminal capture batch failure.
Fields are read through accessors; the struct is #[non_exhaustive].
Does not fire for shutdown-timeout, queue-full, or before_send drops —
those are not delivery failures.
Implementations§
Source§impl<'a> CaptureFailure<'a>
impl<'a> CaptureFailure<'a>
Sourcepub fn error(&self) -> Option<&Error>
pub fn error(&self) -> Option<&Error>
The batch-level cause: a permanent reject, exhausted transport/HTTP retries, or a serialization failure. Always present: every capture failure surfaced to the hook carries a cause.
Sourcepub fn status(&self) -> Option<u16>
pub fn status(&self) -> Option<u16>
The HTTP status of the final attempt, or None when no response was
received (a transport error or a serialization failure before sending).
Sourcepub fn attempt(&self) -> u32
pub fn attempt(&self) -> u32
The failing attempt number (equals the configured maximum on exhaustion).
Sourcepub fn event_count(&self) -> usize
pub fn event_count(&self) -> usize
Number of events this failure dropped (lost).
Sourcepub fn historical_migration(&self) -> bool
pub fn historical_migration(&self) -> bool
Whether the batch was a historical-migration batch.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CaptureFailure<'a>
impl<'a> RefUnwindSafe for CaptureFailure<'a>
impl<'a> Send for CaptureFailure<'a>
impl<'a> Sync for CaptureFailure<'a>
impl<'a> Unpin for CaptureFailure<'a>
impl<'a> UnsafeUnpin for CaptureFailure<'a>
impl<'a> UnwindSafe for CaptureFailure<'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