pub struct BatchResult {
pub total: usize,
pub succeeded: usize,
pub failed: usize,
pub latency_ms: u64,
pub individual_results: Option<Vec<SendResult>>,
}Expand description
Result of sending a batch of events.
Fields§
§total: usizeTotal events in batch.
succeeded: usizeSuccessfully sent events.
failed: usizeFailed events.
latency_ms: u64Time taken in milliseconds.
individual_results: Option<Vec<SendResult>>Individual results (if available).
Implementations§
Source§impl BatchResult
impl BatchResult
Sourcepub fn all_success(total: usize, latency_ms: u64) -> Self
pub fn all_success(total: usize, latency_ms: u64) -> Self
Create a fully successful batch result.
Sourcepub fn all_failed(total: usize, _message: &str) -> Self
pub fn all_failed(total: usize, _message: &str) -> Self
Create a fully failed batch result.
Sourcepub fn all_succeeded(&self) -> bool
pub fn all_succeeded(&self) -> bool
Check if all events succeeded.
Sourcepub fn all_failed_check(&self) -> bool
pub fn all_failed_check(&self) -> bool
Check if all events failed.
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get success rate as a percentage.
Trait Implementations§
Source§impl Clone for BatchResult
impl Clone for BatchResult
Source§fn clone(&self) -> BatchResult
fn clone(&self) -> BatchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchResult
impl RefUnwindSafe for BatchResult
impl Send for BatchResult
impl Sync for BatchResult
impl Unpin for BatchResult
impl UnwindSafe for BatchResult
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