pub struct SimpleEnvironment { /* private fields */ }Expand description
Simple environment implementation backed by filesystem checks
Implementations§
Trait Implementations§
Source§impl Environment for SimpleEnvironment
impl Environment for SimpleEnvironment
Source§fn has_git_repo(&self) -> bool
fn has_git_repo(&self) -> bool
Check if current directory is a git repository
Source§fn git_is_clean(&self) -> bool
fn git_is_clean(&self) -> bool
Check if git working tree is clean (no uncommitted changes)
Source§fn git_commits_ahead(&self) -> usize
fn git_commits_ahead(&self) -> usize
Get number of commits ahead of remote tracking branch
Source§fn git_has_staged(&self) -> bool
fn git_has_staged(&self) -> bool
Check if there are staged changes ready to commit
Source§fn git_has_stash(&self) -> bool
fn git_has_stash(&self) -> bool
Check if there are stashed changes
Source§fn file_exists(&self, path: &str) -> bool
fn file_exists(&self, path: &str) -> bool
Check if a file exists relative to cwd
Source§fn dir_exists(&self, path: &str) -> bool
fn dir_exists(&self, path: &str) -> bool
Check if a directory exists relative to cwd
Auto Trait Implementations§
impl Freeze for SimpleEnvironment
impl RefUnwindSafe for SimpleEnvironment
impl Send for SimpleEnvironment
impl Sync for SimpleEnvironment
impl Unpin for SimpleEnvironment
impl UnwindSafe for SimpleEnvironment
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