pub struct Feed<T> {
pub data: Option<T>,
pub fetched_at: Option<u64>,
pub error: Option<Fail>,
pub in_flight: Option<u64>,
pub next_at: u64,
pub failures: u32,
}Expand description
A thing read on a schedule: the last good value, the error of the last try, and when to try again.
A failure keeps the value (it becomes stale) and backs off (×2 up to 30 s; Retry-After is obeyed).
Fields§
§data: Option<T>§fetched_at: Option<u64>When the last good value arrived (ms since the app opened).
error: Option<Fail>§in_flight: Option<u64>§next_at: u64§failures: u32Implementations§
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for Feed<T>
Auto Trait Implementations§
impl<T> Freeze for Feed<T>
impl<T> RefUnwindSafe for Feed<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for Feed<T>
impl<T> Sync for Feed<T>
impl<T> Unpin for Feed<T>
impl<T> UnsafeUnpin for Feed<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for Feed<T>where
Option<T>: UnwindSafe,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more