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 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.
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.
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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticIndexRoot
impl Debug for SemanticIndexRoot
Source§impl<'de> Deserialize<'de> for SemanticIndexRoot
impl<'de> Deserialize<'de> for SemanticIndexRoot
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SemanticIndexRoot
Source§impl PartialEq for SemanticIndexRoot
impl PartialEq for SemanticIndexRoot
Source§impl Serialize for SemanticIndexRoot
impl Serialize for SemanticIndexRoot
impl StructuralPartialEq for SemanticIndexRoot
Auto Trait Implementations§
impl Freeze for SemanticIndexRoot
impl RefUnwindSafe for SemanticIndexRoot
impl Send for SemanticIndexRoot
impl Sync for SemanticIndexRoot
impl Unpin for SemanticIndexRoot
impl UnsafeUnpin for SemanticIndexRoot
impl UnwindSafe for SemanticIndexRoot
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
Mutably borrows from an owned value. Read more