pub struct SemanticIndexRoot {
pub format_version: u8,
pub extractor_version: u32,
pub grammars: BTreeMap<String, String>,
pub tree: ContentHash,
pub semantic_digest: ContentHash,
pub binding_delta: Option<ContentHash>,
pub importer_index: Option<ContentHash>,
pub resolver_version: u32,
}Expand description
Root of a state’s semantic index. Attached to a state via
StateAttachmentBody::SemanticIndex.
Fields§
§format_version: u8§extractor_version: u32§grammars: BTreeMap<String, String>Language → grammar version, for every language present in the tree.
tree: ContentHashStorage hash of the top SemanticTreeNode.
semantic_digest: ContentHashThe top tree node’s semantic_digest — the whole-tree fingerprint.
binding_delta: Option<ContentHash>State-scoped resolved-edge delta rooted at this state. This is separate
from tree: syntax remains Merkle-shareable while bindings may depend
on repository placement and the first parent’s edge set.
importer_index: Option<ContentHash>File → importers reverse-dependency index for this state. Capture uses the parent copy to re-resolve only the invalidation frontier.
resolver_version: u32Heddle-owned resolver policy version used to produce binding_delta.
Implementations§
Source§impl SemanticIndexRoot
impl SemanticIndexRoot
pub const FORMAT_VERSION: u8 = 1
pub fn new( extractor_version: u32, grammars: BTreeMap<String, String>, tree: ContentHash, semantic_digest: ContentHash, ) -> Self
Sourcepub fn with_binding_delta(
self,
binding_delta: ContentHash,
resolver_version: u32,
) -> Self
pub fn with_binding_delta( self, binding_delta: ContentHash, resolver_version: u32, ) -> Self
Attach a resolved-edge delta to this state-scoped root.
Sourcepub fn with_importer_index(self, importer_index: ContentHash) -> Self
pub fn with_importer_index(self, importer_index: ContentHash) -> Self
Attach the file → importers index used for frontier-bounded re-resolution.
pub fn encode(&self) -> Result<Vec<u8>, SemanticIndexError>
pub fn decode(bytes: &[u8]) -> Result<Self, SemanticIndexError>
Trait Implementations§
Source§impl Clone for SemanticIndexRoot
impl Clone for SemanticIndexRoot
Source§fn clone(&self) -> SemanticIndexRoot
fn clone(&self) -> SemanticIndexRoot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more