pub struct Tagged<V> {
pub ets: u64,
pub msg: EpochMsg<V>,
}Expand description
An epoch message, stamped with the instance it belongs to.
The book writes ep.ts and guards every handler with such that ts = ets, so instances are
addressed by timestamp and a message for one never reaches another. Nothing in this codebase’s
wire does that for free, and the consequence of omitting it is a safety failure rather than a
lost message: a WRITE from epoch 7 arriving after epoch 11 began would be accepted and recorded
at timestamp 11, inventing an acceptance that never happened.
The stamp lives here rather than in the layer above because the epoch is this instance’s own identity — it stamps what it sends and drops what is not addressed to it, so a parent cannot forget to.
Fields§
§ets: u64§msg: EpochMsg<V>Trait Implementations§
Source§impl<'de, V> Deserialize<'de> for Tagged<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for Tagged<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 Tagged<V>
impl<V: PartialEq> StructuralPartialEq for Tagged<V>
Auto Trait Implementations§
impl<V> Freeze for Tagged<V>where
V: Freeze,
impl<V> RefUnwindSafe for Tagged<V>where
V: RefUnwindSafe,
impl<V> Send for Tagged<V>where
V: Send,
impl<V> Sync for Tagged<V>where
V: Sync,
impl<V> Unpin for Tagged<V>where
V: Unpin,
impl<V> UnsafeUnpin for Tagged<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for Tagged<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