pub enum StateTransitionError {
InvalidPair {
from: ReplicaRole,
to: ReplicaRole,
},
SignalMismatch {
from: ReplicaRole,
to: ReplicaRole,
signal: TransitionSignal,
},
}Expand description
Result of validating + applying a state transition.
Variants§
InvalidPair
(from, to) pair is not in the plan §3 matrix.
SignalMismatch
Transition pair is valid in some signal context but not for
the supplied TransitionSignal. Surfaces the kind of
“you used MissedHeartbeats to go Leader → Idle” misuse.
Fields
§
from: ReplicaRoleState the transition started from.
§
to: ReplicaRoleAttempted target state.
§
signal: TransitionSignalSignal class supplied to StateTransition::apply.
Trait Implementations§
Source§impl Clone for StateTransitionError
impl Clone for StateTransitionError
Source§fn clone(&self) -> StateTransitionError
fn clone(&self) -> StateTransitionError
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 moreSource§impl Debug for StateTransitionError
impl Debug for StateTransitionError
Source§impl Display for StateTransitionError
impl Display for StateTransitionError
Source§impl Error for StateTransitionError
impl Error for StateTransitionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<StateTransitionError> for CoordinatorError
impl From<StateTransitionError> for CoordinatorError
Source§fn from(source: StateTransitionError) -> Self
fn from(source: StateTransitionError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StateTransitionError
impl PartialEq for StateTransitionError
Source§fn eq(&self, other: &StateTransitionError) -> bool
fn eq(&self, other: &StateTransitionError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for StateTransitionError
impl Eq for StateTransitionError
impl StructuralPartialEq for StateTransitionError
Auto Trait Implementations§
impl Freeze for StateTransitionError
impl RefUnwindSafe for StateTransitionError
impl Send for StateTransitionError
impl Sync for StateTransitionError
impl Unpin for StateTransitionError
impl UnsafeUnpin for StateTransitionError
impl UnwindSafe for StateTransitionError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.