pub struct MaxConsecutiveFailures(/* private fields */);Expand description
Maximum number of consecutive poll failures before stopping.
MaxConsecutiveFailures represents the threshold for consecutive errors during event polling. Must be at least 1, enforced by using NonZeroU32 as the underlying type.
§Examples
ⓘ
use eventcore_types::projection::MaxConsecutiveFailures;
use std::num::NonZeroU32;
let lenient = MaxConsecutiveFailures::new(NonZeroU32::new(10).expect("10 is non-zero"));
let strict = MaxConsecutiveFailures::new(NonZeroU32::new(3).expect("3 is non-zero"));
// Zero failures not allowed by type system
// let zero = NonZeroU32::new(0); // Returns NoneImplementations§
Source§impl MaxConsecutiveFailures
impl MaxConsecutiveFailures
pub fn new(raw_value: NonZero<u32>) -> MaxConsecutiveFailures
Source§impl MaxConsecutiveFailures
impl MaxConsecutiveFailures
pub fn into_inner(self) -> NonZero<u32>
Trait Implementations§
Source§impl Clone for MaxConsecutiveFailures
impl Clone for MaxConsecutiveFailures
Source§fn clone(&self) -> MaxConsecutiveFailures
fn clone(&self) -> MaxConsecutiveFailures
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 moreSource§impl Debug for MaxConsecutiveFailures
impl Debug for MaxConsecutiveFailures
Source§impl Display for MaxConsecutiveFailures
impl Display for MaxConsecutiveFailures
Source§impl Ord for MaxConsecutiveFailures
impl Ord for MaxConsecutiveFailures
Source§fn cmp(&self, other: &MaxConsecutiveFailures) -> Ordering
fn cmp(&self, other: &MaxConsecutiveFailures) -> Ordering
1.21.0 · 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 MaxConsecutiveFailures
impl PartialEq for MaxConsecutiveFailures
Source§impl PartialOrd for MaxConsecutiveFailures
impl PartialOrd for MaxConsecutiveFailures
impl Copy for MaxConsecutiveFailures
impl Eq for MaxConsecutiveFailures
impl StructuralPartialEq for MaxConsecutiveFailures
Auto Trait Implementations§
impl Freeze for MaxConsecutiveFailures
impl RefUnwindSafe for MaxConsecutiveFailures
impl Send for MaxConsecutiveFailures
impl Sync for MaxConsecutiveFailures
impl Unpin for MaxConsecutiveFailures
impl UnsafeUnpin for MaxConsecutiveFailures
impl UnwindSafe for MaxConsecutiveFailures
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