pub struct PrefixMatch {
pub matched_blocks: Vec<u32>,
pub matched_disk_block_ids: Vec<u32>,
pub matched_tokens: usize,
pub ssm_snapshot: Option<usize>,
pub ssm_snapshot_tokens: usize,
pub ssm_snapshot_tier_key: Option<u64>,
pub ssm_snapshot_tier_tokens: usize,
pub ssm_snapshot_is_tail: bool,
}Expand description
2026-09-26: Result of looking up a token sequence in the prefix cache.
Fields§
§matched_blocks: Vec<u32>2026-09-26: KV blocks to reuse, in token order.
matched_disk_block_ids: Vec<u32>2026-09-26: --high-speed-swap disk-block ids parallel to
matched_blocks, u32::MAX where a block has none; empty when no
matched block has one.
matched_tokens: usize2026-09-26: Tokens matched. Block-aligned unless partial-tail sharing
(METRALE_PREFIX_SUBBLOCK) matched into a block.
ssm_snapshot: Option<usize>2026-09-26: The resident SSM snapshot slot of the deepest snapshot within the match, if that snapshot is resident.
ssm_snapshot_tokens: usize2026-09-26: Tokens covered by ssm_snapshot, at most matched_tokens;
SSM state for the tokens between is not covered.
ssm_snapshot_tier_key: Option<u64>2026-09-26: The tier key (prefix hash) when the deepest snapshot within
the match is spilled; ssm_snapshot is then None. The caller faults
it in and calls PrefixCache::promote_snapshot.
ssm_snapshot_tier_tokens: usize2026-09-26: Tokens covered by ssm_snapshot_tier_key.
ssm_snapshot_is_tail: bool2026-09-26: Whether the matched snapshot is a session tail
(PrefixCache::insert_tail_snapshot).
Implementations§
Trait Implementations§
Source§impl Clone for PrefixMatch
impl Clone for PrefixMatch
Source§fn clone(&self) -> PrefixMatch
fn clone(&self) -> PrefixMatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more