pub struct ProjectContext {
pub root: PathBuf,
pub db_path: PathBuf,
pub pool: SqlitePool,
}Fields§
§root: PathBuf§db_path: PathBuf§pool: SqlitePoolImplementations§
Source§impl ProjectContext
impl ProjectContext
Sourcepub fn find_project_root() -> Option<PathBuf>
pub fn find_project_root() -> Option<PathBuf>
Find the project root by searching upwards for .intent-engine directory
Sourcepub async fn initialize_project() -> Result<Self>
pub async fn initialize_project() -> Result<Self>
Initialize a new Intent-Engine project in the current directory
Sourcepub async fn load_or_init() -> Result<Self>
pub async fn load_or_init() -> Result<Self>
Load project context, initializing if necessary (for write commands)
Auto Trait Implementations§
impl Freeze for ProjectContext
impl !RefUnwindSafe for ProjectContext
impl Send for ProjectContext
impl Sync for ProjectContext
impl Unpin for ProjectContext
impl !UnwindSafe for ProjectContext
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