pub struct Non {
pub retry_strategy: Strategy,
pub max_attempts: Attempts,
}
Expand description
Configuration options related to parsing & handling outbound NON requests
Fields§
§retry_strategy: Strategy
Strategy to use when we sent a NON request and haven’t yet received a response.
Note that in a future commit there will be a method by which NON requests can be “flung” without any expectation of a response.
Defaults to a pessimistic exponential retry strategy:
use embedded_time::duration::Milliseconds;
use toad::config::Non;
use toad::retry::Strategy;
assert_eq!(Non::default().retry_strategy,
Strategy::Exponential { init_min: Milliseconds(250),
init_max: Milliseconds(500) });
max_attempts: Attempts
Number of times we are allowed to resend a NON request before erroring.
Defaults to 4 attempts.
use toad::config::Non;
use toad::retry::Attempts;
assert_eq!(Non::default().max_attempts, Attempts(4));
Trait Implementations§
source§impl Ord for Non
impl Ord for Non
source§impl PartialOrd<Non> for Non
impl PartialOrd<Non> for Non
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Non
impl Eq for Non
impl StructuralEq for Non
impl StructuralPartialEq for Non
Auto Trait Implementations§
impl RefUnwindSafe for Non
impl Send for Non
impl Sync for Non
impl Unpin for Non
impl UnwindSafe for Non
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<F, A, TF, T> Sequence<F, A, TF> for T
impl<F, A, TF, T> Sequence<F, A, TF> for T
source§fn sequence<Ap>(self) -> <Ap as HKT1>::T<<F as HKT1>::T<A>>where
Self: Sized + Traversable<F, <Ap as HKT1>::T<A>, A, TF> + Foldable<F, <Ap as HKT1>::T<A>>,
Ap: HKT1,
<Ap as HKT1>::T<A>: Applicative<Ap, A> + ApplyOnce<Ap, A>,
<Ap as HKT1>::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>,
<Ap as HKT1>::T<<F as HKT1>::T<A>>: Applicative<Ap, <F as HKT1>::T<A>> + ApplyOnce<Ap, <F as HKT1>::T<A>>,
F: HKT1<T<<Ap as HKT1>::T<A>> = Self>,
fn sequence<Ap>(self) -> <Ap as HKT1>::T<<F as HKT1>::T<A>>where Self: Sized + Traversable<F, <Ap as HKT1>::T<A>, A, TF> + Foldable<F, <Ap as HKT1>::T<A>>, Ap: HKT1, <Ap as HKT1>::T<A>: Applicative<Ap, A> + ApplyOnce<Ap, A>, <Ap as HKT1>::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>, <Ap as HKT1>::T<<F as HKT1>::T<A>>: Applicative<Ap, <F as HKT1>::T<A>> + ApplyOnce<Ap, <F as HKT1>::T<A>>, F: HKT1<T<<Ap as HKT1>::T<A>> = Self>,
See
Sequence