use std::path::Path;
use super::error::IndexError;
use super::pipeline::IndexResult;
pub trait Indexer: Send + Sync {
fn index(
&self,
path: &Path,
project_name: &str,
force: bool,
) -> std::result::Result<IndexResult, IndexError>;
fn index_incremental(
&self,
path: &Path,
project_name: &str,
force: bool,
) -> std::result::Result<IndexResult, IndexError>;
fn index_ram_first(
&self,
path: &Path,
project_name: &str,
force: bool,
) -> std::result::Result<IndexResult, IndexError>;
}
#[cfg(test)]
const _: () = {
fn _assert_object_safe(_: &dyn Indexer) {}
fn _assert_send_sync<T: Send + Sync + ?Sized>() {}
fn _check() {
_assert_send_sync::<dyn Indexer>();
let _ = _assert_object_safe;
}
};