pub struct DependencyClosureBuilderV1 { /* private fields */ }Expand description
Incremental constructor used by format loaders after raw declarations are projected.
Implementations§
Source§impl DependencyClosureBuilderV1
impl DependencyClosureBuilderV1
Sourcepub fn new(
primary_input: InputIdentity,
source_coverage: SourceSetCoverageV1,
expected_references: usize,
) -> Self
pub fn new( primary_input: InputIdentity, source_coverage: SourceSetCoverageV1, expected_references: usize, ) -> Self
Begin a closure bound to the raw resource set and exact primary bytes.
Sourcepub const fn primary_input(&self) -> &InputIdentity
pub const fn primary_input(&self) -> &InputIdentity
Exact primary identity this builder is bound to.
Sourcepub const fn max_resource_bytes(&self) -> u64
pub const fn max_resource_bytes(&self) -> u64
Capacity remaining for a single external resource read.
Sourcepub const fn remaining_external_bytes(&self) -> u64
pub const fn remaining_external_bytes(&self) -> u64
Aggregate distinct external byte capacity remaining.
Sourcepub fn external_identity(
&self,
key: &DependencyResourceKeyV1,
) -> Option<&InputIdentity>
pub fn external_identity( &self, key: &DependencyResourceKeyV1, ) -> Option<&InputIdentity>
Whether a normalized key already has a captured identity.
Sourcepub fn begin_reference(
&mut self,
locator_bytes: usize,
path_components: usize,
) -> bool
pub fn begin_reference( &mut self, locator_bytes: usize, path_components: usize, ) -> bool
Admit one source declaration before normalization/allocation/open work.
Returns false at the first N+1 limit and permanently stops capture.
Sourcepub fn prepare_external_key(
&mut self,
key: &DependencyResourceKeyV1,
) -> Result<Option<bool>, DependencyClosureError>
pub fn prepare_external_key( &mut self, key: &DependencyResourceKeyV1, ) -> Result<Option<bool>, DependencyClosureError>
Admit one distinct normalized external key before any rooted open.
Ok(None) is the terminal distinct-key N+1 stop. Ok(Some(false))
means the key was already admitted and its cached outcome must be reused.
Sourcepub fn record_external_open_attempt(
&mut self,
key: &DependencyResourceKeyV1,
) -> Result<(), DependencyClosureError>
pub fn record_external_open_attempt( &mut self, key: &DependencyResourceKeyV1, ) -> Result<(), DependencyClosureError>
Record one rooted open attempt for a newly admitted external key.
§Errors
Returns DependencyClosureError when the key is not prepared or was
already opened. Alias declarations must reuse their cached outcome.
Sourcepub fn push_primary(
&mut self,
source_order_index: usize,
kind: SourceResourceKindV1,
source_index: u64,
) -> Result<(), DependencyClosureError>
pub fn push_primary( &mut self, source_order_index: usize, kind: SourceResourceKindV1, source_index: u64, ) -> Result<(), DependencyClosureError>
Retain an embedded/data/BIN/view-backed declaration mapping.
Sourcepub fn push_refused(
&mut self,
source_order_index: usize,
kind: SourceResourceKindV1,
source_index: u64,
reason: DependencyResourceRefusalReasonV1,
) -> Result<(), DependencyClosureError>
pub fn push_refused( &mut self, source_order_index: usize, kind: SourceResourceKindV1, source_index: u64, reason: DependencyResourceRefusalReasonV1, ) -> Result<(), DependencyClosureError>
Retain a declaration refused before opening.
Retain a safe declaration whose content identity was unavailable.
Sourcepub fn push_external_alias(
&mut self,
source_order_index: usize,
kind: SourceResourceKindV1,
source_index: u64,
key: DependencyResourceKeyV1,
) -> Result<(), DependencyClosureError>
pub fn push_external_alias( &mut self, source_order_index: usize, kind: SourceResourceKindV1, source_index: u64, key: DependencyResourceKeyV1, ) -> Result<(), DependencyClosureError>
Retain an alias mapping to an identity already captured under key.
Sourcepub fn push_captured_external(
&mut self,
source_order_index: usize,
kind: SourceResourceKindV1,
source_index: u64,
key: DependencyResourceKeyV1,
identity: InputIdentity,
) -> Result<bool, DependencyClosureError>
pub fn push_captured_external( &mut self, source_order_index: usize, kind: SourceResourceKindV1, source_index: u64, key: DependencyResourceKeyV1, identity: InputIdentity, ) -> Result<bool, DependencyClosureError>
Retain a newly captured key and its first declaration mapping.
Returns Ok(false) when the first external-byte N+1 records a typed
unavailable mapping and permanently stops capture.
Sourcepub fn mark_unmodeled_resource_domain(&mut self)
pub fn mark_unmodeled_resource_domain(&mut self)
Conservatively prevent completeness for a resource-bearing domain not represented by rows.
Sourcepub fn finish(self) -> Result<DependencyClosureV1, DependencyClosureError>
pub fn finish(self) -> Result<DependencyClosureV1, DependencyClosureError>
Finish the immutable closure and derive its identity only when complete.
§Errors
Returns DependencyClosureError if a declaration was begun but no
typed outcome was supplied.