pub struct ProtocolState {
pub server_dictated_poll_interval: Option<Duration>,
pub consecutive_failed_update_checks: u32,
pub consecutive_proxied_requests: u32,
}
Expand description
These hold the data maintained request-to-request so that the requirements for backoffs, throttling, proxy use, etc. can all be properly maintained. This is NOT the state machine’s internal state.
Fields§
§server_dictated_poll_interval: Option<Duration>
If the server has dictated the next poll interval, this holds what that interval is.
consecutive_failed_update_checks: u32
The number of consecutive failed update checks. Used to perform backoffs.
consecutive_proxied_requests: u32
The number of consecutive proxied requests. Used to periodically not use proxies, in the case of an invalid proxy configuration.
Trait Implementations§
Source§impl Clone for ProtocolState
impl Clone for ProtocolState
Source§fn clone(&self) -> ProtocolState
fn clone(&self) -> ProtocolState
Returns a copy 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 ProtocolState
impl Debug for ProtocolState
Source§impl Default for ProtocolState
impl Default for ProtocolState
Source§fn default() -> ProtocolState
fn default() -> ProtocolState
Returns the “default value” for a type. Read more
Source§impl PartialEq for ProtocolState
impl PartialEq for ProtocolState
impl Eq for ProtocolState
impl StructuralPartialEq for ProtocolState
Auto Trait Implementations§
impl Freeze for ProtocolState
impl RefUnwindSafe for ProtocolState
impl Send for ProtocolState
impl Sync for ProtocolState
impl Unpin for ProtocolState
impl UnwindSafe for ProtocolState
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)