pub struct Commit {
pub clock: Clock,
pub changes: Vec<EffectiveChange>,
pub impact: Impact,
pub state: Vec<StateTransition>,
pub work: Work,
}Expand description
One atomic, exact index transition.
Detached indexes use the process-local Clock as their version sequence. The
opened-root layer later binds that sequence to its own lifetime identity without
putting live-session identity into clonable detached state.
Fields§
§clock: ClockLogical commit clock minted for the complete transition.
changes: Vec<EffectiveChange>Exact retained fact mutations in application order.
impact: ImpactBounded answer invalidation derived from changes and state.
state: Vec<StateTransition>Observable non-entry transitions committed at the same boundary.
work: WorkWork performed to reach this commit.
Implementations§
Source§impl Commit
impl Commit
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether this value carries no effective fact or state transition.
Sourcepub fn retained_cost(&self) -> usize
pub fn retained_cost(&self) -> usize
Approximate bytes this commit retains in the bounded journal.
The estimate is a fixed allowance for the commit’s own frame plus, for every
change, transition, and dirty path, a fixed allowance for the item and the bytes of
the path it names. Paths are the part that varies, so charging their bytes makes
crate::DEFAULT_JOURNAL_CAPACITY_BYTES mean what it says whatever the tree’s paths
look like; a charge per item would let long paths hold many times the budget, and
every change poll clones what the journal holds. The allowances are fixed rather
than measured with size_of so the budget means the same on every target: the
retained types differ in size by platform, and a recorded journal work count would
otherwise differ with them.