struct BindingResolver<'a, 'g, 'n> {Show 19 fields
store: &'a AtlasStore,
project: ProjectInstanceId,
generation: IndexGeneration,
base_generation: Option<IndexGeneration>,
graphs: BTreeMap<&'g str, (&'g SymbolGraph, Option<&'g SourceSemanticFacts>)>,
entities: &'g EntityProjection,
packages: &'a PackageIndex,
configured: &'a ConfiguredModuleResolution,
sources: &'a mut SourceBindingCache<'n>,
candidates: &'a mut ProjectResolutionRegistry,
replaced: &'a BTreeSet<String>,
loaded: Option<BTreeSet<CanonicalResolutionKey>>,
context: BTreeMap<String, Arc<BindingSource<'g>>>,
hydrated: BTreeMap<String, Option<GraphEntity>>,
modules: ModuleInterner,
queries: BTreeMap<BindingQuery, BTreeMap<usize, Arc<CallBindingResolution>>>,
retained_bytes: u64,
retained_limit: u64,
control: &'a IndexWorkControl,
}Expand description
One operation’s source/query caches and existing repository resolution registry.
Fields§
§store: &'a AtlasStoreExisting read authority; no source parsing occurs inside a writer transaction.
project: ProjectInstanceIdSelected project and pending generation.
generation: IndexGenerationPending publication generation.
base_generation: Option<IndexGeneration>Exact graph entity generation available before this publication.
graphs: BTreeMap<&'g str, (&'g SymbolGraph, Option<&'g SourceSemanticFacts>)>Current source graphs paired with their own parser evidence.
entities: &'g EntityProjectionExisting admitted entities and projection keys.
packages: &'a PackageIndexExisting package and configured-module owners.
configured: &'a ConfiguredModuleResolutionOne validated configuration snapshot shared with ordinary resolution.
sources: &'a mut SourceBindingCache<'n>Existing hash-checked, accounted source recovery owner.
candidates: &'a mut ProjectResolutionRegistryExisting candidate lookup owner, extended only for explicitly requested keys.
replaced: &'a BTreeSet<String>Paths replaced by the pending publication must not re-enter through old rows.
loaded: Option<BTreeSet<CanonicalResolutionKey>>Complete candidate keys already fetched in an incremental operation.
context: BTreeMap<String, Arc<BindingSource<'g>>>Captured source views, including borrowed fresh evidence.
hydrated: BTreeMap<String, Option<GraphEntity>>Exact target hydration cached by stable identity, including absent owners.
modules: ModuleInternerCanonical IDs and retained allocation witnesses for this resolver only.
queries: BTreeMap<BindingQuery, BTreeMap<usize, Arc<CallBindingResolution>>>Finished outcomes shared by repeated identical binding queries.
retained_bytes: u64Conservative bytes owned by this resolver’s additional indexes and outcomes.
retained_limit: u64Existing staging ceiling, injectable per owner for deterministic boundary tests.
control: &'a IndexWorkControlShared indexing deadline, cancellation and work budget.
Implementations§
Source§impl<'g> BindingResolver<'_, 'g, '_>
impl<'g> BindingResolver<'_, 'g, '_>
Sourcefn query(
&mut self,
source: &str,
reference: &ImportReference,
member: Option<&str>,
) -> Result<BindingQuery, CliError>
fn query( &mut self, source: &str, reference: &ImportReference, member: Option<&str>, ) -> Result<BindingQuery, CliError>
Bind every query to this resolver’s IDs and reserve retained metadata atomically.
Sourcefn check_budget(&self) -> Result<(), CliError>
fn check_budget(&self) -> Result<(), CliError>
Include every simultaneously live owner in the staging memory boundary.
Sourcefn retained_staging_bytes(&self) -> u64
fn retained_staging_bytes(&self) -> u64
Sum accounted owners without changing their reservation state.
Sourcefn reserve_scratch(&mut self, bytes: u64) -> Result<(), CliError>
fn reserve_scratch(&mut self, bytes: u64) -> Result<(), CliError>
Admit a temporary owner before allocating, retaining prior accounting on refusal.
Sourcefn release_scratch(&mut self, bytes: u64) -> Result<(), CliError>
fn release_scratch(&mut self, bytes: u64) -> Result<(), CliError>
Release exactly one admitted temporary owner without erasing persistent state.
Sourcefn with_scratch<T>(
&mut self,
operation: impl FnOnce(&mut Self, &mut ResolverScratch) -> Result<(T, u64), CliError>,
) -> Result<T, CliError>
fn with_scratch<T>( &mut self, operation: impl FnOnce(&mut Self, &mut ResolverScratch) -> Result<(T, u64), CliError>, ) -> Result<T, CliError>
Release temporary construction on every exit and retain the completed owner once.
Sourcefn insert_cause(
&mut self,
causes: &mut CauseWorkspace<'_>,
key: &CanonicalResolutionKey,
) -> Result<(), CliError>
fn insert_cause( &mut self, causes: &mut CauseWorkspace<'_>, key: &CanonicalResolutionKey, ) -> Result<(), CliError>
Retain only a new key, checking both row and byte admission before cloning.
Sourcefn source(&mut self, path: &str) -> Result<Arc<BindingSource<'g>>, CliError>
fn source(&mut self, path: &str) -> Result<Arc<BindingSource<'g>>, CliError>
Load one explicitly needed source, reusing fresh facts and captured bytes.
Sourcefn module_file(
&mut self,
keys: &[CanonicalResolutionKey],
) -> Result<Option<String>, CliError>
fn module_file( &mut self, keys: &[CanonicalResolutionKey], ) -> Result<Option<String>, CliError>
Fetch each additional canonical lookup once under the existing bounded API.
Sourcefn resolve(
&mut self,
query: BindingQuery,
visited: &mut BTreeMap<BindingQuery, usize>,
depth: usize,
) -> Result<Arc<CallBindingResolution>, CliError>
fn resolve( &mut self, query: BindingQuery, visited: &mut BTreeMap<BindingQuery, usize>, depth: usize, ) -> Result<Arc<CallBindingResolution>, CliError>
Follow explicit module slots; a cycle, ambiguity or unsupported value abstains.
Sourcefn target(
&mut self,
source: &BindingSource<'_>,
index: usize,
) -> Result<Option<GraphEntity>, CliError>
fn target( &mut self, source: &BindingSource<'_>, index: usize, ) -> Result<Option<GraphEntity>, CliError>
Hydrate the exact existing canonical declaration selected by admitted source ordinals.
Auto Trait Implementations§
impl<'a, 'g, 'n> !RefUnwindSafe for BindingResolver<'a, 'g, 'n>
impl<'a, 'g, 'n> !Send for BindingResolver<'a, 'g, 'n>
impl<'a, 'g, 'n> !Sync for BindingResolver<'a, 'g, 'n>
impl<'a, 'g, 'n> !UnwindSafe for BindingResolver<'a, 'g, 'n>
impl<'a, 'g, 'n> Freeze for BindingResolver<'a, 'g, 'n>
impl<'a, 'g, 'n> Unpin for BindingResolver<'a, 'g, 'n>
impl<'a, 'g, 'n> UnsafeUnpin for BindingResolver<'a, 'g, 'n>
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
§impl<'a, T> FromIn<'a, T> for T
impl<'a, T> FromIn<'a, T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more