pub struct QueryTracker { /* private fields */ }Implementations§
Source§impl QueryTracker
impl QueryTracker
pub fn new( db_path: impl AsRef<Path>, use_unsafe_no_lock: bool, ) -> Result<Self, Error>
pub fn track_query_completion( &mut self, query: &str, project_path: &Path, file_path: &Path, ) -> Result<(), Error>
pub fn get_last_query_entry( &self, query: &str, project_path: &Path, min_combo_count: u32, ) -> Result<Option<QueryMatchEntry>, Error>
pub fn get_last_query_path( &self, query: &str, project_path: &Path, file_path: &Path, combo_boost: i32, ) -> Result<i32, Error>
Sourcepub fn get_historical_query(
&self,
project_path: &Path,
offset: usize,
) -> Result<Option<String>, Error>
pub fn get_historical_query( &self, project_path: &Path, offset: usize, ) -> Result<Option<String>, Error>
Get query from file picker history at a specific offset. offset=0 returns most recent query, offset=1 returns 2nd most recent, etc.
Trait Implementations§
Source§impl DbHealthChecker for QueryTracker
impl DbHealthChecker for QueryTracker
Auto Trait Implementations§
impl Freeze for QueryTracker
impl RefUnwindSafe for QueryTracker
impl Send for QueryTracker
impl Sync for QueryTracker
impl Unpin for QueryTracker
impl UnsafeUnpin for QueryTracker
impl UnwindSafe for QueryTracker
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
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