pub struct StateEventDrift {
pub in_events_only: Vec<String>,
pub in_state_only: Vec<String>,
}Expand description
Report of drift between the authoritative event log and the projected state.
Per docs/INVARIANTS.md,
events.jsonl is the authoritative source of truth and state.json is a
projection derived from it. They should always agree about which packages
were published. A drift is a bug — this struct captures which side claims
what, so the end-of-run consistency check can surface it loudly rather
than silently corrupting resume.
A drift with both lists empty means the projection matches the truth and
StateEventDrift::is_consistent returns true.
Labels use the name@version format consistent with the rest of the
event stream (e.g., shipper-types@0.3.0-rc.1).
Fields§
§in_events_only: Vec<String>Packages that have a PackagePublished event in events.jsonl but
are NOT marked PackageState::Published in state.json.
This is the dangerous direction: resume would re-attempt publishing packages that already uploaded successfully.
in_state_only: Vec<String>Packages that are marked PackageState::Published in state.json
but have NO PackagePublished event in events.jsonl.
This shouldn’t happen if events are appended before state is written; if it does, something bypassed the event log.
Implementations§
Source§impl StateEventDrift
impl StateEventDrift
Sourcepub fn is_consistent(&self) -> bool
pub fn is_consistent(&self) -> bool
Returns true iff no drift was detected (both sides agree).
Trait Implementations§
Source§impl Clone for StateEventDrift
impl Clone for StateEventDrift
Source§fn clone(&self) -> StateEventDrift
fn clone(&self) -> StateEventDrift
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StateEventDrift
impl Debug for StateEventDrift
Source§impl Default for StateEventDrift
impl Default for StateEventDrift
Source§fn default() -> StateEventDrift
fn default() -> StateEventDrift
Source§impl<'de> Deserialize<'de> for StateEventDrift
impl<'de> Deserialize<'de> for StateEventDrift
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>,
Source§impl PartialEq for StateEventDrift
impl PartialEq for StateEventDrift
Source§impl Serialize for StateEventDrift
impl Serialize for StateEventDrift
impl Eq for StateEventDrift
impl StructuralPartialEq for StateEventDrift
Auto Trait Implementations§
impl Freeze for StateEventDrift
impl RefUnwindSafe for StateEventDrift
impl Send for StateEventDrift
impl Sync for StateEventDrift
impl Unpin for StateEventDrift
impl UnsafeUnpin for StateEventDrift
impl UnwindSafe for StateEventDrift
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
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
key and return true if they are equal.