pub struct GitOps { /* private fields */ }Expand description
High-level git operations.
Implementations§
Source§impl GitOps
impl GitOps
Sourcepub fn new(repo_path: PathBuf, branch: String) -> Result<Self>
pub fn new(repo_path: PathBuf, branch: String) -> Result<Self>
Create a new wrapper for git operations.
§Errors
Returns an error if the repository cannot be opened.
Sourcepub async fn startup_sync(&self) -> Result<StartupSyncResult>
pub async fn startup_sync(&self) -> Result<StartupSyncResult>
Sourcepub async fn auto_commit(&self, files: &[PathBuf]) -> Result<String>
pub async fn auto_commit(&self, files: &[PathBuf]) -> Result<String>
Sourcepub async fn push_with_retry(&self, max_retries: u32) -> Result<()>
pub async fn push_with_retry(&self, max_retries: u32) -> Result<()>
Sourcepub async fn check_remote(&self) -> Result<bool>
pub async fn check_remote(&self) -> Result<bool>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitOps
impl !RefUnwindSafe for GitOps
impl Send for GitOps
impl Sync for GitOps
impl Unpin for GitOps
impl UnsafeUnpin for GitOps
impl !UnwindSafe for GitOps
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