pub struct SkipCounts { /* private fields */ }Expand description
Durable committed skip counts, kept distinct per phase.
Implementations§
Source§impl SkipCounts
impl SkipCounts
Sourcepub const fn new(read: u64, process: u64, write: u64) -> Self
pub const fn new(read: u64, process: u64, write: u64) -> Self
Constructs committed per-phase skip counts.
Sourcepub fn checked_total(self) -> Result<u64, FaultPolicyError>
pub fn checked_total(self) -> Result<u64, FaultPolicyError>
Returns the checked aggregate used by the shared skip limit.
§Errors
Returns FaultPolicyError::SkipCountOverflow instead of wrapping.
Sourcepub fn checked_add(self, other: Self) -> Result<Self, FaultPolicyError>
pub fn checked_add(self, other: Self) -> Result<Self, FaultPolicyError>
Returns the totals after adding one chunk’s committed skips.
§Errors
Returns FaultPolicyError::SkipCountOverflow instead of wrapping.
Sourcepub fn checked_increment(
self,
phase: FaultPhase,
) -> Result<Self, FaultPolicyError>
pub fn checked_increment( self, phase: FaultPhase, ) -> Result<Self, FaultPolicyError>
Returns the counts after one committed skip in phase.
§Errors
Returns FaultPolicyError::PhaseNotSkippable for a phase that cannot
commit a skip, and FaultPolicyError::SkipCountOverflow instead of
wrapping.
Trait Implementations§
Source§impl Clone for SkipCounts
impl Clone for SkipCounts
Source§fn clone(&self) -> SkipCounts
fn clone(&self) -> SkipCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SkipCounts
Source§impl Debug for SkipCounts
impl Debug for SkipCounts
Source§impl Default for SkipCounts
impl Default for SkipCounts
Source§fn default() -> SkipCounts
fn default() -> SkipCounts
Returns the “default value” for a type. Read more
impl Eq for SkipCounts
Source§impl Hash for SkipCounts
impl Hash for SkipCounts
Source§impl Ord for SkipCounts
impl Ord for SkipCounts
Source§fn cmp(&self, other: &SkipCounts) -> Ordering
fn cmp(&self, other: &SkipCounts) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SkipCounts
impl PartialEq for SkipCounts
Source§impl PartialOrd for SkipCounts
impl PartialOrd for SkipCounts
impl StructuralPartialEq for SkipCounts
Auto Trait Implementations§
impl Freeze for SkipCounts
impl RefUnwindSafe for SkipCounts
impl Send for SkipCounts
impl Sync for SkipCounts
impl Unpin for SkipCounts
impl UnsafeUnpin for SkipCounts
impl UnwindSafe for SkipCounts
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