pub struct SyncState {
pub last_attempt: Option<OffsetDateTime>,
pub last_success: Option<OffsetDateTime>,
pub last_outcome: Option<SyncOutcome>,
pub etag: Option<String>,
pub last_modified: Option<String>,
pub failure_streak: u32,
}Fields§
§last_attempt: Option<OffsetDateTime>§last_success: Option<OffsetDateTime>§last_outcome: Option<SyncOutcome>§etag: Option<String>Validators handed back to the service on the next request.
last_modified: Option<String>§failure_streak: u32Consecutive failures, used for exponential backoff.
Implementations§
Source§impl SyncState
impl SyncState
pub fn record(&mut self, at: OffsetDateTime, outcome: SyncOutcome)
pub fn is_failing(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SyncState
impl<'de> Deserialize<'de> for SyncState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SyncState
impl RefUnwindSafe for SyncState
impl Send for SyncState
impl Sync for SyncState
impl Unpin for SyncState
impl UnsafeUnpin for SyncState
impl UnwindSafe for SyncState
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