pub struct BranchWrite {
pub branch: String,
pub created_seq: u64,
pub coll: String,
pub id: String,
pub value: Option<Value>,
pub at_seq: u64,
pub source_hash: String,
}Expand description
A single write made on a branch, as recorded in the overlay.
Fields§
§branch: String§created_seq: u64Which generation of the name this belongs to — see branch_key.
coll: String§id: String§value: Option<Value>None is a branch-side delete, which is a different fact from
“the branch never touched this id”. Modelled as an explicit option
rather than an absent record for exactly that reason.
at_seq: u64The parent sequence the branch write consumed.
PHASE 5B: this becomes the CHILD sequence, drawn from the branch’s own counter. Today a branch write advances the parent’s counter, which is the one place the overlay is visibly not a separate store.
source_hash: StringThe hash of the node that RECORDS this branch write — the source identity a merge replay points back at.
Captured at write time because it cannot be recovered later: a merge that replayed without it would produce destination nodes with no causal edge to what caused them, and nothing downstream could reconstruct the link. The edge has to be written when both ends are in hand.
Today it addresses the overlay record in the parent store. PHASE 5B: it
becomes the branch store’s own node hash, and the cause it produces
becomes a qualified Cause { store, hash } – see crate::cause.
Trait Implementations§
Source§impl Clone for BranchWrite
impl Clone for BranchWrite
Source§fn clone(&self) -> BranchWrite
fn clone(&self) -> BranchWrite
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BranchWrite
impl Debug for BranchWrite
Source§impl<'de> Deserialize<'de> for BranchWrite
impl<'de> Deserialize<'de> for BranchWrite
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 BranchWrite
impl PartialEq for BranchWrite
Source§impl Serialize for BranchWrite
impl Serialize for BranchWrite
impl StructuralPartialEq for BranchWrite
Auto Trait Implementations§
impl Freeze for BranchWrite
impl RefUnwindSafe for BranchWrite
impl Send for BranchWrite
impl Sync for BranchWrite
impl Unpin for BranchWrite
impl UnsafeUnpin for BranchWrite
impl UnwindSafe for BranchWrite
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more