Skip to main content

StoreDiscovery

Trait StoreDiscovery 

Source
pub trait StoreDiscovery {
    // Required method
    fn capabilities(&self) -> DiscoveryCapabilities;

    // Provided methods
    fn search(&self, _query: ValidatedSearch<'_>) -> Result<SearchPage> { ... }
    fn enumerate(&self, _page: ValidatedPage<'_>) -> Result<SearchPage> { ... }
}
Expand description

Optional discovery operations exposed by a file-store adapter. Discovery returns candidates without registering models or fetching weights. Methods are synchronous; search and enumeration may block on I/O. Advertise only operations and filter semantics the adapter can honor.

Required Methods§

Source

fn capabilities(&self) -> DiscoveryCapabilities

Describe supported operations and provider-specific filters without I/O.

Provided Methods§

Source

fn search(&self, _query: ValidatedSearch<'_>) -> Result<SearchPage>

Search one page after Discovery validates the request. Implement text and filter semantics, combining predicates with AND. Unknown metadata must not be treated as a matching value, even for NotEqual. Report known omissions from missing filter metadata in SearchPage::gaps. The supplied cursor is provider-native. Validate it before using it; the dispatcher’s envelope checks do not authenticate or validate its contents.

Source

fn enumerate(&self, _page: ValidatedPage<'_>) -> Result<SearchPage>

Enumerate one page without a search predicate. A searchable store need not support enumeration; registering it must not initiate a full crawl. Discovery checks the advertised enumeration limit before calling this. Validate the native cursor and return None when there are no further pages.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§