Skip to main content

ForkOrigin

Struct ForkOrigin 

Source
pub struct ForkOrigin {
    pub run_id: RunId,
    pub through_seq: SequenceNumber,
    pub from_node: String,
    pub graph_hash: String,
    pub acknowledged_writes: Vec<u64>,
}
Expand description

The recorded link from a forked run back to the run it forked from.

A fork is a new run, never a mutation of the origin: its log opens with the origin’s prefix (every event with seq below the fork boundary) rewritten under the fork’s own run id, and ForkOrigin rides on the fork’s Event::GraphRunStarted at seq 0 as the durable fact of that descent. The origin is immutable and never points forward at its forks; “forks of this run” is a derived server-side index over this field, not something the origin records.

Carries no floats, so it derives Eq (unlike Budget); every field is plain recorded data.

Fields§

§run_id: RunId

The run this fork descends from.

§through_seq: SequenceNumber

The boundary the prefix was taken through: the fork’s log carries the origin’s events with seq below the Event::NodeEntered that the fork restarts from. A genuine log position, so it rides as a SequenceNumber.

§from_node: String

The id of the node the fork restarts execution from.

§graph_hash: String

The origin’s graph hash, which the fork must reuse unchanged. A fork may not edit the graph: a different document could route the shared prefix differently, turning a clean refusal into an arbitrary mid-replay divergence. Opaque here, exactly like Event::GraphRunStarted::graph_hash.

§acknowledged_writes: Vec<u64>

The origin log positions of the Effect::Write intents the operator acknowledged when forking past them. Raw u64 positions, not SequenceNumbers: this is an operator acknowledgement list recorded as evidence, not a set of correlation keys this crate dereferences. An empty vector means the fork boundary sat before any write intent, so nothing needed acknowledging.

Trait Implementations§

Source§

impl Clone for ForkOrigin

Source§

fn clone(&self) -> ForkOrigin

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ForkOrigin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ForkOrigin

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ForkOrigin, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ForkOrigin

Source§

impl PartialEq for ForkOrigin

Source§

fn eq(&self, other: &ForkOrigin) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ForkOrigin

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ForkOrigin

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.