pub struct WorkerState {
pub paused: bool,
pub explicit_off: bool,
pub stopped_optin_id: Option<String>,
pub enrolled_fresh: bool,
pub day: String,
pub used: Usage,
}Expand description
The local worker state: pause flag and what this machine used today.
Fields§
§paused: bool§explicit_off: boolThe person turned task pickup off (rc4-16). Durable: cloud worker resume lifts only paused, never this; only a turn-on LeanCTX Code
signed with its opt-in key clears it (clear_off), and so does an
opt-in the person turned on on the web (reconcile).
stopped_optin_id: Option<String>The opt-in id that was current when this computer turned task pickup
off; empty when none was active then, None when it is not known
yet. The id rotates on every stop and turn-on, so an active opt-in
with another id was turned on after this off, on the web.
enrolled_fresh: boolSet by enrollment only: a first turn-on may be preselected
(suggest_on). A state written again after its file went missing
lacks it, so deleting the file never brings the suggestion back.
day: StringUTC day the counters belong to (YYYY-MM-DD).
used: UsageTrait Implementations§
Source§impl Clone for WorkerState
impl Clone for WorkerState
Source§impl Debug for WorkerState
impl Debug for WorkerState
Source§impl Default for WorkerState
impl Default for WorkerState
Source§impl<'de> Deserialize<'de> for WorkerStatewhere
WorkerState: Default,
impl<'de> Deserialize<'de> for WorkerStatewhere
WorkerState: Default,
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>,
impl Eq for WorkerState
Source§impl PartialEq for WorkerState
impl PartialEq for WorkerState
Source§impl Serialize for WorkerState
impl Serialize for WorkerState
impl StructuralPartialEq for WorkerState
Auto Trait Implementations§
impl Forget for WorkerState
impl Freeze for WorkerState
impl Move for WorkerState
impl RefUnwindSafe for WorkerState
impl Send for WorkerStatewhere
RawVecInner: Send,
impl Sync for WorkerStatewhere
RawVecInner: Sync,
impl Unpin for WorkerState
impl UnsafeUnpin for WorkerState
impl UnwindSafe for WorkerStatewhere
RawVecInner: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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