Struct grm::repo::RepoHandle
source · [−]pub struct RepoHandle(_);
Implementations
sourceimpl RepoHandle
impl RepoHandle
pub fn open(path: &Path, is_worktree: bool) -> Result<Self, RepoError>
pub fn stash(&self) -> Result<(), String>
pub fn stash_pop(&self) -> Result<(), String>
pub fn rename_remote(
&self,
remote: &RemoteHandle<'_>,
new_name: &str
) -> Result<(), String>
pub fn graph_ahead_behind(
&self,
local_branch: &Branch<'_>,
remote_branch: &Branch<'_>
) -> Result<(usize, usize), String>
pub fn head_branch(&self) -> Result<Branch<'_>, String>
pub fn remote_set_url(&self, name: &str, url: &str) -> Result<(), String>
pub fn remote_delete(&self, name: &str) -> Result<(), String>
pub fn is_empty(&self) -> Result<bool, String>
pub fn is_bare(&self) -> bool
pub fn new_worktree(
&self,
name: &str,
directory: &Path,
target_branch: &Branch<'_>
) -> Result<(), String>
pub fn remotes(&self) -> Result<Vec<String>, String>
pub fn new_remote(&self, name: &str, url: &str) -> Result<(), String>
pub fn fetchall(&self) -> Result<(), String>
pub fn local_branches(&self) -> Result<Vec<Branch<'_>>, String>
pub fn fetch(&self, remote_name: &str) -> Result<(), String>
pub fn init(path: &Path, is_worktree: bool) -> Result<Self, String>
pub fn config(&self) -> Result<Config, String>
pub fn find_worktree(&self, name: &str) -> Result<(), String>
pub fn prune_worktree(&self, name: &str) -> Result<(), String>
pub fn find_remote_branch(
&self,
remote_name: &str,
branch_name: &str
) -> Result<Branch<'_>, String>
pub fn find_local_branch(&self, name: &str) -> Result<Branch<'_>, String>
pub fn create_branch(
&self,
name: &str,
target: &Commit<'_>
) -> Result<Branch<'_>, String>
pub fn make_bare(&self, value: bool) -> Result<(), String>
pub fn convert_to_worktree(
&self,
root_dir: &Path
) -> Result<(), WorktreeConversionFailureReason>
pub fn set_config_push(
&self,
value: GitPushDefaultSetting
) -> Result<(), String>
pub fn has_untracked_files(&self, is_worktree: bool) -> Result<bool, String>
pub fn status(&self, is_worktree: bool) -> Result<RepoStatus, String>
pub fn default_branch(&self) -> Result<Branch<'_>, String>
pub fn find_remote(
&self,
remote_name: &str
) -> Result<Option<RemoteHandle<'_>>, String>
pub fn get_worktrees(&self) -> Result<Vec<Worktree>, String>
pub fn remove_worktree(
&self,
name: &str,
worktree_dir: &Path,
force: bool,
worktree_config: &Option<WorktreeRootConfig>
) -> Result<(), WorktreeRemoveFailureReason>
pub fn cleanup_worktrees(&self, directory: &Path) -> Result<Vec<String>, String>
pub fn find_unmanaged_worktrees(
&self,
directory: &Path
) -> Result<Vec<String>, String>
pub fn detect_worktree(path: &Path) -> bool
Auto Trait Implementations
impl RefUnwindSafe for RepoHandle
impl Send for RepoHandle
impl !Sync for RepoHandle
impl Unpin for RepoHandle
impl UnwindSafe for RepoHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more