Skip to main content

DocumentLoader

Struct DocumentLoader 

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

One explicit local document-environment snapshot.

Implementations§

Source§

impl DocumentLoader

Source

pub fn from_system() -> Self

Capture native manual roots and lazily snapshot the manual index and Markdown registration.

Source

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.

Source

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.

Source

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

Source

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.

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.