pub struct QueueResult {
pub total: usize,
pub completed: usize,
pub failed: usize,
pub errors: Vec<(String, String)>,
}Expand description
Result summary for a completed job queue run.
Fields§
§total: usize§completed: usize§failed: usize§errors: Vec<(String, String)>(job_name, error_message) pairs for each failure.
Implementations§
Source§impl QueueResult
impl QueueResult
Sourcepub fn success_rate(&self) -> f32
pub fn success_rate(&self) -> f32
Fraction of jobs that succeeded, in [0.0, 1.0].
Returns 1.0 when total == 0.
Sourcepub fn all_succeeded(&self) -> bool
pub fn all_succeeded(&self) -> bool
Returns true when every job completed without error.
Sourcepub fn has_failures(&self) -> bool
pub fn has_failures(&self) -> bool
Returns true when at least one job failed.
Trait Implementations§
Source§impl Clone for QueueResult
impl Clone for QueueResult
Source§fn clone(&self) -> QueueResult
fn clone(&self) -> QueueResult
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 QueueResult
impl RefUnwindSafe for QueueResult
impl Send for QueueResult
impl Sync for QueueResult
impl Unpin for QueueResult
impl UnsafeUnpin for QueueResult
impl UnwindSafe for QueueResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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