pub struct AppDb { /* private fields */ }Expand description
Application database handle.
Implementations§
Source§impl AppDb
impl AppDb
Sourcepub fn open(db_path: &Path) -> DbResult<Self>
pub fn open(db_path: &Path) -> DbResult<Self>
Open or create the app database at the given path.
Sourcepub fn add_recent_project(&self, path: &str, name: &str) -> DbResult<()>
pub fn add_recent_project(&self, path: &str, name: &str) -> DbResult<()>
Add or update a recent project entry.
Sourcepub fn list_recent_projects(&self) -> DbResult<Vec<RecentProject>>
pub fn list_recent_projects(&self) -> DbResult<Vec<RecentProject>>
List recent projects ordered by last opened (most recent first).
Sourcepub fn save_recent_project(
&self,
path: &str,
name: &str,
score: Option<f64>,
traffic_light: Option<&str>,
) -> DbResult<()>
pub fn save_recent_project( &self, path: &str, name: &str, score: Option<f64>, traffic_light: Option<&str>, ) -> DbResult<()>
Save or update a recent project with score.
Auto Trait Implementations§
impl !Freeze for AppDb
impl !RefUnwindSafe for AppDb
impl Send for AppDb
impl !Sync for AppDb
impl Unpin for AppDb
impl UnsafeUnpin for AppDb
impl !UnwindSafe for AppDb
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