pub struct GitSheetsRepo {
pub path: PathBuf,
pub git_repo: Option<Repository>,
}Expand description
A git-sheets repository
Fields§
§path: PathBufPath to the repository
git_repo: Option<Repository>Git repository handle (optional)
Implementations§
Source§impl GitSheetsRepo
impl GitSheetsRepo
Sourcepub fn init(path: PathBuf) -> Result<GitSheetsRepo>
pub fn init(path: PathBuf) -> Result<GitSheetsRepo>
Initialize a new git-sheets repository
Sourcepub fn open(path: &str) -> Result<GitSheetsRepo>
pub fn open(path: &str) -> Result<GitSheetsRepo>
Open an existing git-sheets repository
Sourcepub fn commit_snapshot(&self) -> Result<()>
pub fn commit_snapshot(&self) -> Result<()>
Commit a snapshot to git
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if there are uncommitted changes
Auto Trait Implementations§
impl Freeze for GitSheetsRepo
impl RefUnwindSafe for GitSheetsRepo
impl Send for GitSheetsRepo
impl !Sync for GitSheetsRepo
impl Unpin for GitSheetsRepo
impl UnsafeUnpin for GitSheetsRepo
impl UnwindSafe for GitSheetsRepo
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