pub struct RawSourceFactsBuilderV1 { /* private fields */ }Expand description
Builder used by format loaders to create a bounded immutable V1 projection.
Implementations§
Source§impl RawSourceFactsBuilderV1
impl RawSourceFactsBuilderV1
Sourcepub fn new(format: SourceFormatV1, primary_identity: InputIdentity) -> Self
pub fn new(format: SourceFormatV1, primary_identity: InputIdentity) -> Self
Begin one projection bound to the exact primary bytes already captured by the loader.
Sourcepub fn set_linear_unit(
&mut self,
value: SourceObservationV1<SourceLinearUnitV1>,
) -> bool
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.
Sourcepub fn set_coordinate_basis(
&mut self,
value: SourceObservationV1<SourceCoordinateBasisV1>,
) -> bool
pub fn set_coordinate_basis( &mut self, value: SourceObservationV1<SourceCoordinateBasisV1>, ) -> bool
Set the signed coordinate-basis observation.
Sourcepub fn set_frames_per_second(
&mut self,
value: SourceObservationV1<SourceFramesPerSecondV1>,
) -> bool
pub fn set_frames_per_second( &mut self, value: SourceObservationV1<SourceFramesPerSecondV1>, ) -> bool
Set the source frame-rate observation.
Sourcepub const fn remaining_observation_rows(&self) -> usize
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.
Sourcepub fn remaining_clip_rows(&self) -> usize
pub fn remaining_clip_rows(&self) -> usize
Clip/take identity-row capacity remaining.
Sourcepub fn remaining_resource_rows(&self) -> usize
pub fn remaining_resource_rows(&self) -> usize
Resource-reference row capacity remaining.
Sourcepub const fn resource_coverage(&self) -> SourceSetCoverageV1
pub const fn resource_coverage(&self) -> SourceSetCoverageV1
Current raw resource-declaration coverage for closure capture.
Sourcepub fn resource_rows(&self) -> &[SourceResourceReferenceV1]
pub fn resource_rows(&self) -> &[SourceResourceReferenceV1]
Retained raw resource-declaration prefix for closure capture.
Sourcepub const fn primary_identity(&self) -> &InputIdentity
pub const fn primary_identity(&self) -> &InputIdentity
Exact primary identity this projection is bound to.
Sourcepub const fn remaining_text_bytes(&self) -> usize
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.
Mark a row domain unavailable and discard any retained prefix.
Sourcepub fn mark_partial(
&mut self,
domain: SourceFactDomainV1,
reason: SourceUnavailableReasonV1,
)
pub fn mark_partial( &mut self, domain: SourceFactDomainV1, reason: SourceUnavailableReasonV1, )
Mark a retained row domain partial without removing positive-presence rows.
Sourcepub fn mark_complete(&mut self, domain: SourceFactDomainV1)
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.
Sourcepub fn mark_budget_exceeded(&mut self, domain: SourceFactDomainV1)
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.
Sourcepub fn observe_traversal_depth(
&mut self,
domain: SourceFactDomainV1,
depth: usize,
) -> bool
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.
Sourcepub fn push_clip(&mut self, clip: SourceClipFactV1) -> bool
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.
Sourcepub fn push_construct(&mut self, row: SourceConstructFactV1) -> bool
pub fn push_construct(&mut self, row: SourceConstructFactV1) -> bool
Retain one deterministic extension/custom construct row.
Sourcepub fn push_resource(&mut self, row: SourceResourceReferenceV1) -> bool
pub fn push_resource(&mut self, row: SourceResourceReferenceV1) -> bool
Retain one deterministic resource-declaration row.
Sourcepub fn finish(
self,
document: Document,
) -> Result<LoadedSource, SourceFactsError>
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.
Sourcepub fn finish_with_dependency_closure(
self,
document: Document,
dependency_closure: DependencyClosureV1,
) -> Result<LoadedSource, SourceFactsError>
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.