pub enum EpochMsg<V> {
Read,
StateIs {
valts: u64,
val: Option<V>,
},
Write {
val: V,
},
Accept,
Decided {
val: V,
},
}Expand description
What this layer puts on the wire, beneath the broadcast.
Variants§
Read
[READ] — the leader asking what everyone holds.
StateIs
[STATE, valts, val] — a follower’s answer, addressed to the leader.
Write
[WRITE, v] — the leader telling everyone what to accept.
Fields
§
val: VAccept
[ACCEPT] — a follower’s acknowledgement, addressed to the leader.
Decided
[DECIDED, v] — the leader announcing the decision.
Fields
§
val: VTrait Implementations§
Source§impl<'de, V> Deserialize<'de> for EpochMsg<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for EpochMsg<V>where
V: Deserialize<'de>,
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>,
Deserialize this value from the given Serde deserializer. Read more
impl<V: Eq> Eq for EpochMsg<V>
Source§impl<V: PartialEq> PartialEq for EpochMsg<V>
impl<V: PartialEq> PartialEq for EpochMsg<V>
impl<V: PartialEq> StructuralPartialEq for EpochMsg<V>
Auto Trait Implementations§
impl<V> Freeze for EpochMsg<V>where
V: Freeze,
impl<V> RefUnwindSafe for EpochMsg<V>where
V: RefUnwindSafe,
impl<V> Send for EpochMsg<V>where
V: Send,
impl<V> Sync for EpochMsg<V>where
V: Sync,
impl<V> Unpin for EpochMsg<V>where
V: Unpin,
impl<V> UnsafeUnpin for EpochMsg<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for EpochMsg<V>where
V: 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