pub struct SourceSemanticFacts { /* private fields */ }Expand description
Transient binding proof paired with one exact captured source graph.
This is not a serialized public graph or a persisted second authority. A consumer must retain the source identity and remap ordinals when filtering or merging the accompanying graph. Missing facts never authorize an exact call.
Implementations§
Source§impl SourceSemanticFacts
impl SourceSemanticFacts
Sourcepub fn content_hash(&self) -> &str
pub fn content_hash(&self) -> &str
Borrow the hash that must match the captured inventory before reuse.
Sourcepub fn imports(&self) -> &[SourceImportFact]
pub fn imports(&self) -> &[SourceImportFact]
Borrow source-order import bindings.
Sourcepub fn calls(&self) -> &[SourceCallFact]
pub fn calls(&self) -> &[SourceCallFact]
Borrow call-site decisions and exact source extents.
Sourcepub fn exports(&self) -> &[SourceExportFact]
pub fn exports(&self) -> &[SourceExportFact]
Borrow explicit module exports and their source-owned targets.
Sourcepub const fn rust(&self) -> Option<&SourceRustFacts>
pub const fn rust(&self) -> Option<&SourceRustFacts>
Borrow Rust module ownership captured by the native source parser.
Sourcepub const fn cargo(&self) -> Option<&SourceCargoTargets>
pub const fn cargo(&self) -> Option<&SourceCargoTargets>
Borrow Cargo target settings from this exact manifest’s existing parse.
Sourcepub const fn exports_complete(&self) -> bool
pub const fn exports_complete(&self) -> bool
Return whether all competing source export slots fit within the evidence bound.
Sourcepub fn retained_bytes(&self) -> u64
pub fn retained_bytes(&self) -> u64
Estimate retained bytes from actual vector/string capacities and shared sets.
Immutable overload arrays are charged once per shared allocation, including their reference-count header. This is staging accounting, not measured RSS.
Sourcepub fn matches_graph(&self, graph: &SymbolGraph) -> bool
pub fn matches_graph(&self, graph: &SymbolGraph) -> bool
Check the owning path and vector shape before an ordinal-based operation.
Sourcepub fn remap(
&self,
original: &SymbolGraph,
graph: &SymbolGraph,
symbols: &[Option<usize>],
relations: &[Option<usize>],
) -> Result<Self, SourceSemanticRemapError>
pub fn remap( &self, original: &SymbolGraph, graph: &SymbolGraph, symbols: &[Option<usize>], relations: &[Option<usize>], ) -> Result<Self, SourceSemanticRemapError>
Move source evidence through explicit filtering or reordering maps.
Each map addresses an original ordinal and optionally supplies its output ordinal. Dropping any required binding proof makes a surviving call unresolved; filtering cannot turn an ambiguous binding into an exact one. New graph facts without captured evidence gain no binding proof.
§Errors
Returns an error for another source path, mismatched mapping dimensions, duplicate/out-of-bounds outputs or a changed relation family. The original evidence remains unchanged on failure.
Sourcepub fn retain_graph_facts(
&mut self,
graph: &mut SymbolGraph,
symbols: &[bool],
relations: &[bool],
) -> Result<(), SourceSemanticRemapError>
pub fn retain_graph_facts( &mut self, graph: &mut SymbolGraph, symbols: &[bool], relations: &[bool], ) -> Result<(), SourceSemanticRemapError>
Retain graph facts and their source proof together without cloning the graph.
True mask entries retain the corresponding original ordinal. The source hash is preserved; dropped declaration/import proof cannot authorize a call.
§Errors
Returns a source-identity or mask-dimension mismatch before either graph or evidence changes. Once validated, filtering and remapping are infallible.
Trait Implementations§
Source§impl Clone for SourceSemanticFacts
impl Clone for SourceSemanticFacts
Source§fn clone(&self) -> SourceSemanticFacts
fn clone(&self) -> SourceSemanticFacts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SourceSemanticFacts
impl Debug for SourceSemanticFacts
Source§impl Default for SourceSemanticFacts
impl Default for SourceSemanticFacts
Source§fn default() -> SourceSemanticFacts
fn default() -> SourceSemanticFacts
impl Eq for SourceSemanticFacts
Source§impl PartialEq for SourceSemanticFacts
impl PartialEq for SourceSemanticFacts
Source§fn eq(&self, other: &SourceSemanticFacts) -> bool
fn eq(&self, other: &SourceSemanticFacts) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SourceSemanticFacts
Auto Trait Implementations§
impl Freeze for SourceSemanticFacts
impl RefUnwindSafe for SourceSemanticFacts
impl Send for SourceSemanticFacts
impl Sync for SourceSemanticFacts
impl Unpin for SourceSemanticFacts
impl UnsafeUnpin for SourceSemanticFacts
impl UnwindSafe for SourceSemanticFacts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.