pub struct AlwaysContinue;Expand description
A polling policy that continues on any error.
This policy must be decorated to limit the number of polling attempts or the duration of the polling loop.
The policy continues regardless of the error type or contents.
§Example
let policy = AlwaysContinue;
assert!(policy.on_error(&PollingState::default().set_attempt_count(1_u32), permanent_error()).is_continue());
use google_cloud_gax::error::{Error, rpc::Code, rpc::Status};
fn permanent_error() -> Error { Error::service(Status::default().set_code(Code::Aborted)) }Trait Implementations§
Source§impl Clone for AlwaysContinue
impl Clone for AlwaysContinue
Source§fn clone(&self) -> AlwaysContinue
fn clone(&self) -> AlwaysContinue
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 AlwaysContinue
impl Debug for AlwaysContinue
impl PollingErrorPolicy for AlwaysContinue
Auto Trait Implementations§
impl Freeze for AlwaysContinue
impl RefUnwindSafe for AlwaysContinue
impl Send for AlwaysContinue
impl Sync for AlwaysContinue
impl Unpin for AlwaysContinue
impl UnwindSafe for AlwaysContinue
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> PollingErrorPolicyExt for Twhere
T: PollingErrorPolicy,
impl<T> PollingErrorPolicyExt for Twhere
T: PollingErrorPolicy,
Source§fn with_time_limit(self, maximum_duration: Duration) -> LimitedElapsedTime<Self>
fn with_time_limit(self, maximum_duration: Duration) -> LimitedElapsedTime<Self>
Decorate a PollingErrorPolicy to limit the total elapsed time in the
polling loop. Read more
Source§fn with_attempt_limit(self, maximum_attempts: u32) -> LimitedAttemptCount<Self>
fn with_attempt_limit(self, maximum_attempts: u32) -> LimitedAttemptCount<Self>
Decorate a PollingErrorPolicy to limit the number of poll attempts. Read more