pub struct SqliteBackend { /* private fields */ }Expand description
SQLite 后端实现
Implementations§
Source§impl SqliteBackend
impl SqliteBackend
Sourcepub async fn new_in_dir(dir: &Path) -> Result<Self>
pub async fn new_in_dir(dir: &Path) -> Result<Self>
在指定目录创建或打开数据库
Sourcepub async fn new_in_system_temp() -> Result<Self>
pub async fn new_in_system_temp() -> Result<Self>
使用系统临时目录
Sourcepub async fn new_in_temp_root(temp_root: &Path) -> Result<Self>
pub async fn new_in_temp_root(temp_root: &Path) -> Result<Self>
在指定临时根目录下创建临时索引
Sourcepub async fn search_ids(&self, query: SearchQuery) -> Result<Vec<String>>
pub async fn search_ids(&self, query: SearchQuery) -> Result<Vec<String>>
搜索节点 ID
Sourcepub async fn search_docs(&self, query: SearchQuery) -> Result<Vec<IndexDoc>>
pub async fn search_docs(&self, query: SearchQuery) -> Result<Vec<IndexDoc>>
搜索并返回完整文档
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteBackend
impl !UnwindSafe for SqliteBackend
impl Freeze for SqliteBackend
impl Send for SqliteBackend
impl Sync for SqliteBackend
impl Unpin for SqliteBackend
impl UnsafeUnpin for SqliteBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more