pub struct DepBatch {
pub data: SmallVec<[HandleId; 1]>,
pub prev_data: HandleId,
pub involved: bool,
}Expand description
Per-dep batch data passed to BindingBoundary::invoke_fn.
Mirrors the canonical spec R2.9.b DepRecord shape at the FFI boundary.
Each entry represents one dep’s state for the current wave:
data— DATA handles accumulated this wave (R1.3.6.b coalescing). Empty means the dep settled RESOLVED or was not involved.prev_data— last DATA handle from the end of the previous wave.NO_HANDLEif the dep has never emitted DATA.involved—trueiff the dep was dirtied-then-settled this wave. Distinguishes “RESOLVED in wave” (involved && data.is_empty()) from “not involved” (!involved && data.is_empty()).
Fields§
§data: SmallVec<[HandleId; 1]>DATA handles accumulated this wave. Outside batch() scope, at most
1 element. Inside batch(), K consecutive emits on the same source
produce K entries per R1.3.6.b coalescing.
prev_data: HandleIdLast DATA handle from the end of the previous wave. NO_HANDLE
means the dep has never emitted DATA.
involved: boolWhether this dep was involved (dirtied → settled) in the current wave.
Implementations§
Source§impl DepBatch
impl DepBatch
Sourcepub fn latest(&self) -> HandleId
pub fn latest(&self) -> HandleId
The “latest” handle for this dep — the last DATA in the current wave’s
batch, falling back to prev_data if no DATA arrived this wave.
Returns NO_HANDLE only when the dep has never emitted.
Sourcepub fn is_sentinel(&self) -> bool
pub fn is_sentinel(&self) -> bool
Convenience: is this dep in sentinel state (never emitted DATA)?