pub trait QueryAdapter: Send + Sync {
// Required method
fn execute(
&self,
store: &Store,
query: &str,
) -> Result<Vec<QueryResult>, StoreError>;
}Expand description
Trait for pluggable query adapters.
Adapters encapsulate query logic (e.g. search by metadata, semantic
similarity, path patterns) and call Store methods internally.
This is object-safe: dyn QueryAdapter works.
Required Methods§
Sourcefn execute(
&self,
store: &Store,
query: &str,
) -> Result<Vec<QueryResult>, StoreError>
fn execute( &self, store: &Store, query: &str, ) -> Result<Vec<QueryResult>, StoreError>
Execute a query against the store.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".