pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn builder() -> ClientBuilder<()>
pub fn new(auth: impl AuthStrategy + 'static) -> Result<Self>
pub async fn get_repo(&self, owner: &str, repo: &str) -> Result<Repository>
pub async fn list_branches( &self, owner: &str, repo: &str, ) -> Result<Vec<Branch>>
pub async fn get_branch( &self, owner: &str, repo: &str, branch: &str, ) -> Result<Branch>
pub async fn get_content( &self, owner: &str, repo: &str, path: &str, git_ref: Option<&str>, ) -> Result<FileContent>
pub async fn create_or_update_file( &self, owner: &str, repo: &str, path: &str, message: &str, content: &str, sha: Option<&str>, branch: Option<&str>, ) -> Result<Value>
pub async fn get_ref( &self, owner: &str, repo: &str, ref_path: &str, ) -> Result<Reference>
pub async fn create_ref( &self, owner: &str, repo: &str, ref_name: &str, sha: &str, ) -> Result<Reference>
pub async fn update_ref( &self, owner: &str, repo: &str, ref_path: &str, sha: &str, force: bool, ) -> Result<Reference>
pub async fn get_tree( &self, owner: &str, repo: &str, tree_sha: &str, recursive: bool, ) -> Result<Tree>
pub async fn create_tree( &self, owner: &str, repo: &str, base_tree: Option<&str>, entries: Vec<CreateTreeEntry>, ) -> Result<Tree>
pub async fn create_commit( &self, owner: &str, repo: &str, message: &str, tree_sha: &str, parents: Vec<&str>, ) -> Result<Value>
pub async fn create_blob( &self, owner: &str, repo: &str, content: &str, encoding: &str, ) -> Result<Blob>
pub async fn get_authenticated_user(&self) -> Result<User>
pub async fn list_releases( &self, owner: &str, repo: &str, ) -> Result<Vec<Release>>
pub async fn get_latest_release( &self, owner: &str, repo: &str, ) -> Result<Release>
pub async fn get_release_by_tag( &self, owner: &str, repo: &str, tag: &str, ) -> Result<Release>
pub async fn list_release_assets( &self, owner: &str, repo: &str, release_id: u64, ) -> Result<Vec<ReleaseAsset>>
pub async fn download_asset(&self, url: &str) -> Result<Bytes>
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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