pub struct CommitsClient<'a> { /* private fields */ }Expand description
Client for commit operations (/{org}/{repo}/commits).
Implementations§
Source§impl<'a> CommitsClient<'a>
impl<'a> CommitsClient<'a>
Sourcepub fn list(
&self,
ref: Option<&'a str>,
limit: Option<u8>,
) -> impl Stream<Item = Result<GetByOrgByRepoCommits200ResponseCommitsInner, Error<GetByOrgByRepoCommitsError>>> + 'a
pub fn list( &self, ref: Option<&'a str>, limit: Option<u8>, ) -> impl Stream<Item = Result<GetByOrgByRepoCommits200ResponseCommitsInner, Error<GetByOrgByRepoCommitsError>>> + 'a
List commits, optionally filtered by ref.
Returns an async stream that automatically paginates through all results,
yielding one commit at a time. Pass limit to control the page size of
each underlying API request, or None for the server default.
Sourcepub async fn get(
&self,
sha: &str,
) -> Result<GetByOrgByRepoCommitsBySha200Response, Error<GetByOrgByRepoCommitsByShaError>>
pub async fn get( &self, sha: &str, ) -> Result<GetByOrgByRepoCommitsBySha200Response, Error<GetByOrgByRepoCommitsByShaError>>
Sourcepub async fn create(
&self,
branch: &str,
message: &str,
author: &CommitAuthor,
files: &[CommitFile],
base_sha: Option<&str>,
) -> Result<CommitResponse, Error<CreateCommitError>>
pub async fn create( &self, branch: &str, message: &str, author: &CommitAuthor, files: &[CommitFile], base_sha: Option<&str>, ) -> Result<CommitResponse, Error<CreateCommitError>>
Create a commit with file operations.
Uses the hand-written implementation to work around the missing
Upsert action variant in the generated code.
§Errors
Returns an error if the API request fails.
Trait Implementations§
Source§impl<'a> Clone for CommitsClient<'a>
impl<'a> Clone for CommitsClient<'a>
Source§fn clone(&self) -> CommitsClient<'a>
fn clone(&self) -> CommitsClient<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for CommitsClient<'a>
impl<'a> !RefUnwindSafe for CommitsClient<'a>
impl<'a> Send for CommitsClient<'a>
impl<'a> Sync for CommitsClient<'a>
impl<'a> Unpin for CommitsClient<'a>
impl<'a> !UnwindSafe for CommitsClient<'a>
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