pub struct GitWorktree {
pub dir: TempDir,
pub path: PathBuf,
pub repo_path: PathBuf,
pub is_managed: bool,
}Fields§
§dir: TempDir§path: PathBuf§repo_path: PathBuf§is_managed: boolImplementations§
Source§impl GitWorktree
impl GitWorktree
pub fn from_path(path: PathBuf, repo_path: PathBuf) -> Self
pub async fn new( repo_path: &Path, commit_hash: &str, parent_dir: Option<&Path>, ) -> Result<Self>
pub async fn apply_patch(&self, patch_content: &str) -> Result<()>
pub async fn get_commit_show(&self, hash: &str) -> Result<String>
pub async fn get_commit_message(&self, hash: &str) -> Result<String>
pub async fn is_merge_commit(&self, hash: &str) -> Result<bool>
pub async fn is_empty_commit(&self, hash: &str) -> Result<bool>
pub async fn reset_hard(&self, ref_name: &str) -> Result<()>
pub async fn remove(self) -> Result<()>
Trait Implementations§
Source§impl Drop for GitWorktree
impl Drop for GitWorktree
Auto Trait Implementations§
impl Freeze for GitWorktree
impl RefUnwindSafe for GitWorktree
impl Send for GitWorktree
impl Sync for GitWorktree
impl Unpin for GitWorktree
impl UnsafeUnpin for GitWorktree
impl UnwindSafe for GitWorktree
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.