Struct lib::state::State [−][src]
pub struct State { /* fields omitted */ }Expand description
State containing at least location info
Implementations
Build a state, either by reading current persisted state in cache
or by creating an empty default one.
Update state with location and ensure persisting of state on disk
Update mattermost status depending upon current state
If current_location is Unknown, then nothing is changed.
If current_location is still the same for more than MAX_SECS_BEFORE_FORCE_UPDATE
then we force update the mattermost status in order to catch up with desynchronise state
Else we update mattermost status to the one associated to current_location.
Trait Implementations
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 RefUnwindSafe for State
impl UnwindSafe for State
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more