pub struct VersioningServiceAsyncClient<T>(/* private fields */);
Expand description
This is the external-facing portion of VersioningService which gives clients access to functionality that doesn’t create new commits. The creation of new commits should be done via the resource-specific services.
Implementations§
Source§impl<T> VersioningServiceAsyncClient<T>where
T: AsyncClient,
impl<T> VersioningServiceAsyncClient<T>where
T: AsyncClient,
Sourcepub async fn create_branch(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
request: &CreateBranchRequest,
) -> Result<Branch, Error>
pub async fn create_branch( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, request: &CreateBranchRequest, ) -> Result<Branch, Error>
Creates a mutable pointer to the provided commit. “Saves”/“commits” can be performed on this pointer. Throws if the name is already used as a commit pointer for this resource. Throws if the provided commit doesn’t exist.
Sourcepub async fn create_tag(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
request: &CreateTagRequest,
) -> Result<Tag, Error>
pub async fn create_tag( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, request: &CreateTagRequest, ) -> Result<Tag, Error>
Creates an immutable pointer to the provided commit. Throws if the name is already used as a commit pointer for this resource. Throws if the provided commit doesn’t exist.
Sourcepub async fn get_commit(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
commit_id: &CommitId,
) -> Result<Commit, Error>
pub async fn get_commit( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, commit_id: &CommitId, ) -> Result<Commit, Error>
Throws if the commit doesn’t exist.
Sourcepub async fn batch_get_commits(
&self,
auth_: &BearerToken,
resource_and_commit_ids: &BTreeSet<ResourceAndCommitId>,
) -> Result<BTreeSet<Commit>, Error>
pub async fn batch_get_commits( &self, auth_: &BearerToken, resource_and_commit_ids: &BTreeSet<ResourceAndCommitId>, ) -> Result<BTreeSet<Commit>, Error>
Filters out resources that are not authorized.
Sourcepub async fn get_commit_by_branch(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
branch_name: &BranchName,
) -> Result<Commit, Error>
pub async fn get_commit_by_branch( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, branch_name: &BranchName, ) -> Result<Commit, Error>
Returns the commit pointed to by the branch. Throws if the branch doesn’t exist.
Sourcepub async fn get_commit_by_tag(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
tag_name: &TagName,
) -> Result<Commit, Error>
pub async fn get_commit_by_tag( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, tag_name: &TagName, ) -> Result<Commit, Error>
Returns the commit pointed to by the tag. Throws if the tag doesn’t exist.
Sourcepub async fn get_least_common_ancestor(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
request: &GetLeastCommonAncestorRequest,
) -> Result<CommitId, Error>
pub async fn get_least_common_ancestor( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, request: &GetLeastCommonAncestorRequest, ) -> Result<CommitId, Error>
Returns the least common ancestor of the two commits. Throws if either commit doesn’t exist.
Sourcepub async fn get_commit_history(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
commit_id: &CommitId,
page_size: Option<i32>,
next_page_token: Option<&Token>,
) -> Result<CommitHistory, Error>
pub async fn get_commit_history( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, commit_id: &CommitId, page_size: Option<i32>, next_page_token: Option<&Token>, ) -> Result<CommitHistory, Error>
Returns the commit history sorted by creation time descending. Excludes working state commits. Throws if the commit doesn’t exist.
Sourcepub async fn persist_commits(
&self,
auth_: &BearerToken,
request: &BTreeSet<ResourceAndCommitId>,
) -> Result<(), Error>
pub async fn persist_commits( &self, auth_: &BearerToken, request: &BTreeSet<ResourceAndCommitId>, ) -> Result<(), Error>
Persists the commits so that they are not compacted. This operation is atomic - either all commits are persisted or none are (in the case of an error).
Sourcepub async fn get_branch(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
branch_name: &BranchName,
) -> Result<Branch, Error>
pub async fn get_branch( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, branch_name: &BranchName, ) -> Result<Branch, Error>
Throws if the branch doesn’t exist.
Sourcepub async fn get_branches(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
) -> Result<Vec<Branch>, Error>
pub async fn get_branches( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, ) -> Result<Vec<Branch>, Error>
Returns all branches for the resource in order of most recently updated.
Sourcepub async fn batch_get_branches(
&self,
auth_: &BearerToken,
resource_and_branches: &BTreeSet<ResourceAndBranchName>,
) -> Result<BTreeSet<Branch>, Error>
pub async fn batch_get_branches( &self, auth_: &BearerToken, resource_and_branches: &BTreeSet<ResourceAndBranchName>, ) -> Result<BTreeSet<Branch>, Error>
Omits branches that are not authorized.
Sourcepub async fn get_tag(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
tag_name: &TagName,
) -> Result<Tag, Error>
pub async fn get_tag( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, tag_name: &TagName, ) -> Result<Tag, Error>
Throws if the tag doesn’t exist.
Omits tags that are not authorized.
Returns all tags for the resource in order of most recently created.
Sourcepub async fn delete_branch(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
branch_name: &BranchName,
) -> Result<(), Error>
pub async fn delete_branch( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, branch_name: &BranchName, ) -> Result<(), Error>
Deletes the branch pointer. Throws if the branch doesn’t exist. Throws if you attempt to delete the “main” branch.
Sourcepub async fn delete_branches(
&self,
auth_: &BearerToken,
resource_and_branches: &BTreeSet<ResourceAndBranchName>,
) -> Result<(), Error>
pub async fn delete_branches( &self, auth_: &BearerToken, resource_and_branches: &BTreeSet<ResourceAndBranchName>, ) -> Result<(), Error>
Deletes the branch pointers. Throws if any resource or branch is non-existent or unauthorized. Throws if any attempt is made to delete “main”.
Sourcepub async fn delete_tag(
&self,
auth_: &BearerToken,
resource_rid: &ResourceIdentifier,
tag_name: &TagName,
) -> Result<(), Error>
pub async fn delete_tag( &self, auth_: &BearerToken, resource_rid: &ResourceIdentifier, tag_name: &TagName, ) -> Result<(), Error>
Deletes the tag pointer. Throws if the tag doesn’t exist.
Trait Implementations§
Source§impl<T> AsyncService<T> for VersioningServiceAsyncClient<T>where
T: AsyncClient,
impl<T> AsyncService<T> for VersioningServiceAsyncClient<T>where
T: AsyncClient,
Source§impl<T: Clone> Clone for VersioningServiceAsyncClient<T>
impl<T: Clone> Clone for VersioningServiceAsyncClient<T>
Source§fn clone(&self) -> VersioningServiceAsyncClient<T>
fn clone(&self) -> VersioningServiceAsyncClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for VersioningServiceAsyncClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for VersioningServiceAsyncClient<T>where
T: RefUnwindSafe,
impl<T> Send for VersioningServiceAsyncClient<T>where
T: Send,
impl<T> Sync for VersioningServiceAsyncClient<T>where
T: Sync,
impl<T> Unpin for VersioningServiceAsyncClient<T>where
T: Unpin,
impl<T> UnwindSafe for VersioningServiceAsyncClient<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request