Skip to main content

AsyncRepository

Struct AsyncRepository 

Source
pub struct AsyncRepository { /* private fields */ }
Expand description

Async wrapper around Repository.

Cloneable. Each method clones the inner Arc<Repository> and dispatches to tokio::task::spawn_blocking so that blocking VCS I/O does not stall the async executor.

Implementations§

Source§

impl AsyncRepository

Source

pub async fn open(path: &Path) -> Result<Self>

Opens a Git repository at path.

Source

pub async fn open_jj(path: &Path) -> Result<Self>

Opens a Jujutsu repository at path.

Source

pub async fn status_digest(&self) -> Result<StatusDigest>

Source

pub async fn local_branches(&self) -> Result<Vec<BranchInfo>>

Source

pub async fn remote_branches(&self) -> Result<Vec<BranchInfo>>

Source

pub async fn list_commits(&self) -> Result<Vec<CommitInfo>>

Source

pub async fn list_commits_sorted( &self, order: SortOrder, ) -> Result<Vec<CommitInfo>>

Source

pub async fn log_since( &self, since: SystemTime, until: SystemTime, ) -> Result<Vec<CommitInfo>>

Source

pub async fn find_commit(&self, id: CommitId) -> Result<CommitInfo>

Source

pub async fn query_commits( &self, query: CommitQuery, ) -> Result<CommitQueryResult>

Source

pub async fn list_tags(&self) -> Result<Vec<TagInfo>>

Source

pub async fn list_tags_sorted(&self, order: SortOrder) -> Result<Vec<TagInfo>>

Source

pub async fn create_tag(&self, name: String) -> Result<()>

Source

pub async fn create_annotated_tag( &self, name: String, message: String, ) -> Result<()>

Source

pub async fn delete_tag(&self, name: String) -> Result<()>

Source

pub async fn diff(&self, from: CommitId, to: CommitId) -> Result<DiffSummary>

Source

pub async fn remote_url(&self, name: String) -> Result<Option<String>>

Source

pub async fn is_dirty(&self) -> Result<bool>

Source

pub async fn merge_base( &self, a: CommitId, b: CommitId, ) -> Result<Option<CommitId>>

Source

pub async fn is_ancestor( &self, candidate: CommitId, descendant: CommitId, ) -> Result<bool>

Source

pub async fn blame(&self, path: PathBuf) -> Result<Vec<BlameEntry>>

Source

pub async fn worktree_status(&self) -> Result<WorktreeStatus>

Source

pub async fn rich_worktree_status( &self, options: StatusOptions, ) -> Result<RichWorktreeStatus>

Source

pub async fn file_at_commit( &self, path: PathBuf, commit_id: CommitId, ) -> Result<Vec<u8>>

Source

pub async fn submodules(&self) -> Result<Vec<SubmoduleInfo>>

Source

pub async fn stash_entries(&self) -> Result<Vec<StashEntry>>

Source

pub async fn worktrees(&self) -> Result<Vec<WorktreeInfo>>

Source

pub async fn ahead_behind( &self, local: CommitId, upstream: CommitId, ) -> Result<AheadBehind>

Source

pub async fn branch_ahead_behind( &self, branch: String, ) -> Result<Option<AheadBehind>>

Source

pub async fn repository_info(&self) -> Result<RepositoryInfo>

Source

pub async fn branch_tracking( &self, branch: String, ) -> Result<BranchTrackingInfo>

Source

pub async fn local_branch_tracking(&self) -> Result<Vec<BranchTrackingInfo>>

Source

pub async fn is_merged_into( &self, branch: String, target: String, ) -> Result<bool>

Source

pub async fn operation_state(&self) -> Result<OperationState>

Source

pub async fn unmerged_paths(&self) -> Result<Vec<PathBuf>>

Source

pub async fn conflict_summary(&self) -> Result<ConflictSummary>

Source

pub async fn blame_at( &self, path: PathBuf, commit_id: CommitId, ) -> Result<Vec<BlameEntry>>

Source

pub async fn tree_at_commit( &self, commit_id: CommitId, ) -> Result<Vec<TreeEntry>>

Source

pub async fn tree_at_path( &self, commit_id: CommitId, path: PathBuf, ) -> Result<Vec<TreeEntry>>

Source

pub async fn remotes(&self) -> Result<Vec<RemoteInfo>>

Source

pub async fn references(&self) -> Result<Vec<RefInfo>>

Source

pub async fn references_by_kind(&self, kind: RefKind) -> Result<Vec<RefInfo>>

Source

pub async fn submodule_summaries(&self) -> Result<Vec<SubmoduleSummary>>

Source

pub async fn stash_detail(&self, index: usize) -> Result<StashDetail>

Source

pub async fn stash_diff(&self, index: usize) -> Result<DiffSummary>

Source

pub async fn worktree_details(&self) -> Result<Vec<WorktreeDetail>>

Source

pub async fn snapshot( &self, request: SnapshotRequest, ) -> Result<RepositorySnapshot>

Source

pub async fn diff_entries( &self, from: CommitId, to: CommitId, options: DiffOptions, ) -> Result<Vec<DiffEntry>>

Trait Implementations§

Source§

impl Clone for AsyncRepository

Source§

fn clone(&self) -> AsyncRepository

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.