pub struct DocumentLoader { /* private fields */ }Expand description
One explicit local document-environment snapshot.
Implementations§
Source§impl DocumentLoader
impl DocumentLoader
Sourcepub fn from_system() -> Self
pub fn from_system() -> Self
Capture native manual roots and lazily snapshot the manual index and Markdown registration.
Sourcepub fn load(
&self,
spec: LoadSpec<'_>,
policy: LoadPolicy,
) -> Result<ResolvedContent, LoadError>
pub fn load( &self, spec: LoadSpec<'_>, policy: LoadPolicy, ) -> Result<ResolvedContent, LoadError>
Load one borrowed source specification against this environment snapshot. Reusing a loader preserves manual and registered-document precedence. Construct a new loader to refresh discovery.
§Errors
Returns invalid source-selection input or unreadable local content.
Sourcepub fn discover(&self, query: &CatalogQuery) -> Result<DocumentCatalog, String>
pub fn discover(&self, query: &CatalogQuery) -> Result<DocumentCatalog, String>
Filter the same registered-document and manual snapshots used by
Self::load.
§Errors
Returns source-configuration or catalog-query failures as one host boundary diagnostic.
Sourcepub fn discover_prepared(
&self,
plan: &PreparedCatalogQuery<'_>,
) -> Result<DocumentCatalog, String>
pub fn discover_prepared( &self, plan: &PreparedCatalogQuery<'_>, ) -> Result<DocumentCatalog, String>
Discover using an already validated and compiled catalog query.
This reuses both the supplied matcher and this loader’s environment snapshot. No source lookup occurs while the query is being prepared.
§Errors
Returns source configuration or catalog acquisition failures.
Source§impl DocumentLoader
impl DocumentLoader
Sourcepub fn resolve_scope(
&self,
query: &DocumentScope,
) -> Result<LoadedDocumentScope, ScopeLoadError>
pub fn resolve_scope( &self, query: &DocumentScope, ) -> Result<LoadedDocumentScope, ScopeLoadError>
Resolve initial documents and their typed outbound links breadth-first.
§Errors
Returns an invalid-scope error, or an aggregate error when no initial document is readable. Individual missing links remain in the result.