Skip to main content

RawSourceFactsBuilderV1

Struct RawSourceFactsBuilderV1 

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

Builder used by format loaders to create a bounded immutable V1 projection.

Implementations§

Source§

impl RawSourceFactsBuilderV1

Source

pub fn new(format: SourceFormatV1, primary_identity: InputIdentity) -> Self

Begin one projection bound to the exact primary bytes already captured by the loader.

Source

pub fn set_linear_unit( &mut self, value: SourceObservationV1<SourceLinearUnitV1>, ) -> bool

Set the source linear-unit observation.

Returns false when its provenance would exceed the aggregate text budget; the stored observation is then unavailable with a budget reason.

Source

pub fn set_coordinate_basis( &mut self, value: SourceObservationV1<SourceCoordinateBasisV1>, ) -> bool

Set the signed coordinate-basis observation.

Source

pub fn set_frames_per_second( &mut self, value: SourceObservationV1<SourceFramesPerSecondV1>, ) -> bool

Set the source frame-rate observation.

Source

pub const fn remaining_observation_rows(&self) -> usize

Observation-row capacity remaining across all enumerable domains.

Loaders use this before allocating the next nested channel prefix.

Source

pub fn remaining_clip_rows(&self) -> usize

Clip/take identity-row capacity remaining.

Source

pub fn remaining_resource_rows(&self) -> usize

Resource-reference row capacity remaining.

Source

pub const fn resource_coverage(&self) -> SourceSetCoverageV1

Current raw resource-declaration coverage for closure capture.

Source

pub fn resource_rows(&self) -> &[SourceResourceReferenceV1]

Retained raw resource-declaration prefix for closure capture.

Source

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

Exact primary identity this projection is bound to.

Source

pub const fn remaining_text_bytes(&self) -> usize

Retained UTF-8 byte capacity remaining.

Loaders use this before cloning the next source name or locator.

Source

pub fn mark_unavailable( &mut self, domain: SourceFactDomainV1, reason: SourceUnavailableReasonV1, )

Mark a row domain unavailable and discard any retained prefix.

Source

pub fn mark_partial( &mut self, domain: SourceFactDomainV1, reason: SourceUnavailableReasonV1, )

Mark a retained row domain partial without removing positive-presence rows.

Source

pub fn mark_complete(&mut self, domain: SourceFactDomainV1)

Confirm exhaustive traversal for one row domain.

This proves absence for an empty set only when no earlier partial or terminal-unavailable condition was recorded.

Source

pub fn mark_budget_exceeded(&mut self, domain: SourceFactDomainV1)

Record the terminal N+1 row without constructing or cloning it.

Loaders call this once when a public remaining-capacity accessor reaches zero, then stop projection work for that set.

Source

pub fn observe_traversal_depth( &mut self, domain: SourceFactDomainV1, depth: usize, ) -> bool

Record source traversal work and stop the affected domain at depth N+1.

Returns true while projection may continue for that domain.

Source

pub fn push_clip(&mut self, clip: SourceClipFactV1) -> bool

Retain one source-order clip/take row and its channel prefix.

Returns true when the clip identity row was retained. Budget excess never becomes a loader failure.

Source

pub fn push_construct(&mut self, row: SourceConstructFactV1) -> bool

Retain one deterministic extension/custom construct row.

Source

pub fn push_resource(&mut self, row: SourceResourceReferenceV1) -> bool

Retain one deterministic resource-declaration row.

Source

pub fn finish( self, document: Document, ) -> Result<LoadedSource, SourceFactsError>

Bind the retained facts to the normalized document from the same parse.

§Errors

Returns SourceFactsError when source row ordering or normalized clip mappings contradict the document being bound.

Source

pub fn finish_with_dependency_closure( self, document: Document, dependency_closure: DependencyClosureV1, ) -> Result<LoadedSource, SourceFactsError>

Bind retained facts and dependency closure to one normalized document.

This is the format-loader completion path once bounded resource capture has run. The closure primary identity and retained reference prefix must match this raw projection exactly.

§Errors

Returns SourceFactsError for source row/document contradictions or a mismatched dependency closure.

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.