Skip to main content

DependencyClosureBuilderV1

Struct DependencyClosureBuilderV1 

Source
pub struct DependencyClosureBuilderV1 { /* private fields */ }
Expand description

Incremental constructor used by format loaders after raw declarations are projected.

Implementations§

Source§

impl DependencyClosureBuilderV1

Source

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.

Source

pub const fn primary_input(&self) -> &InputIdentity

Exact primary identity this builder is bound to.

Source

pub const fn max_resource_bytes(&self) -> u64

Capacity remaining for a single external resource read.

Source

pub const fn remaining_external_bytes(&self) -> u64

Aggregate distinct external byte capacity remaining.

Source

pub fn external_identity( &self, key: &DependencyResourceKeyV1, ) -> Option<&InputIdentity>

Whether a normalized key already has a captured identity.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn push_unavailable( &mut self, source_order_index: usize, kind: SourceResourceKindV1, source_index: u64, key: Option<DependencyResourceKeyV1>, reason: DependencyResourceUnavailableReasonV1, ) -> Result<(), DependencyClosureError>

Retain a safe declaration whose content identity was unavailable.

Source

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.

Source

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.

Source

pub fn mark_unmodeled_resource_domain(&mut self)

Conservatively prevent completeness for a resource-bearing domain not represented by rows.

Source

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.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.