#[non_exhaustive]pub enum StateValidity {
Valid,
Pending,
Invalid,
}Expand description
What a bind means for state an application derived from an earlier one.
The answer to “may I keep what I computed?” has three values, not two,
and a client that offered a boolean would have to guess one of them. See
Continuity::state_validity.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Valid
Keep it. The same session came back with everything intact.
Pending
Not known yet. A recovery is in flight, and whether anything was lost
is something only the server can say — it does, in the
SessionEvent::Recovered that follows immediately. Hold your state
and decide when Recovery::is_lossless answers.
Invalid
Discard it. Nothing carries over, and the snapshots that follow are what to rebuild from.
Trait Implementations§
Source§impl Clone for StateValidity
impl Clone for StateValidity
Source§fn clone(&self) -> StateValidity
fn clone(&self) -> StateValidity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StateValidity
Source§impl Debug for StateValidity
impl Debug for StateValidity
impl Eq for StateValidity
Source§impl Hash for StateValidity
impl Hash for StateValidity
Source§impl Ord for StateValidity
impl Ord for StateValidity
Source§fn cmp(&self, other: &StateValidity) -> Ordering
fn cmp(&self, other: &StateValidity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for StateValidity
impl PartialEq for StateValidity
Source§impl PartialOrd for StateValidity
impl PartialOrd for StateValidity
impl StructuralPartialEq for StateValidity
Auto Trait Implementations§
impl Freeze for StateValidity
impl RefUnwindSafe for StateValidity
impl Send for StateValidity
impl Sync for StateValidity
impl Unpin for StateValidity
impl UnsafeUnpin for StateValidity
impl UnwindSafe for StateValidity
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