Skip to main content

SourceSemanticFacts

Struct SourceSemanticFacts 

Source
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

Source

pub fn path(&self) -> &str

Borrow the exact source path that owns these ordinals.

Source

pub fn content_hash(&self) -> &str

Borrow the hash that must match the captured inventory before reuse.

Source

pub fn imports(&self) -> &[SourceImportFact]

Borrow source-order import bindings.

Source

pub fn calls(&self) -> &[SourceCallFact]

Borrow call-site decisions and exact source extents.

Source

pub fn exports(&self) -> &[SourceExportFact]

Borrow explicit module exports and their source-owned targets.

Source

pub const fn rust(&self) -> Option<&SourceRustFacts>

Borrow Rust module ownership captured by the native source parser.

Source

pub const fn cargo(&self) -> Option<&SourceCargoTargets>

Borrow Cargo target settings from this exact manifest’s existing parse.

Source

pub const fn exports_complete(&self) -> bool

Return whether all competing source export slots fit within the evidence bound.

Source

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.

Source

pub fn matches_graph(&self, graph: &SymbolGraph) -> bool

Check the owning path and vector shape before an ordinal-based operation.

Source

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.

Source

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

Source§

fn clone(&self) -> SourceSemanticFacts

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SourceSemanticFacts

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SourceSemanticFacts

Source§

fn default() -> SourceSemanticFacts

Returns the “default value” for a type. Read more
Source§

impl Eq for SourceSemanticFacts

Source§

impl PartialEq for SourceSemanticFacts

Source§

fn eq(&self, other: &SourceSemanticFacts) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SourceSemanticFacts

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<'a, T> FromIn<'a, T> for T

§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.