pub struct IndexConnection { /* private fields */ }Implementations§
Source§impl IndexConnection
impl IndexConnection
pub fn open(path: &Path) -> Result<Self>
Sourcepub fn open_read_only(path: &Path) -> Result<Self>
pub fn open_read_only(path: &Path) -> Result<Self>
Read-only open for latency-critical, never-blocking callers (the grep-augment hook
fallback). Skips setup() — no pragma writes, no dir creation — and refuses to create
the file. WAL databases serve concurrent read-only opens; a DB that has never been
opened for write errors here, which callers treat as “no context”.
pub fn database_path(&self) -> &Path
pub fn connection(&self) -> &Connection
pub fn source_root(&self) -> Option<&Path>
pub fn set_source_root(&mut self, source_root: PathBuf)
pub fn execute_batch(&self, sql: &str) -> Result<()>
pub fn status(&self) -> Result<StorageStatus>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for IndexConnection
impl !RefUnwindSafe for IndexConnection
impl !Sync for IndexConnection
impl !UnwindSafe for IndexConnection
impl Send for IndexConnection
impl Unpin for IndexConnection
impl UnsafeUnpin for IndexConnection
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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