Struct binstalk_git_repo_api::gh_api_client::GhApiClient
source · pub struct GhApiClient(/* private fields */);
Expand description
Github API client for querying whether a release artifact exitsts. Can only handle github.com for now.
Implementations§
source§impl GhApiClient
impl GhApiClient
source§impl GhApiClient
impl GhApiClient
pub fn has_gh_token(&self) -> bool
pub async fn get_repo_info( &self, repo: &GhRepo, ) -> Result<Option<RepoInfo>, GhApiError>
source§impl GhApiClient
impl GhApiClient
sourcepub async fn has_release_artifact(
&self,
__arg1: GhReleaseArtifact,
) -> Result<Option<GhReleaseArtifactUrl>, GhApiError>
pub async fn has_release_artifact( &self, __arg1: GhReleaseArtifact, ) -> Result<Option<GhReleaseArtifactUrl>, GhApiError>
Return Ok(Some(api_artifact_url))
if exists.
The returned future is guaranteed to be pointer size.
pub async fn download_artifact( &self, artifact_url: GhReleaseArtifactUrl, ) -> Result<Download<'static>, GhApiError>
Trait Implementations§
source§impl Clone for GhApiClient
impl Clone for GhApiClient
source§fn clone(&self) -> GhApiClient
fn clone(&self) -> GhApiClient
Returns a copy 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 Freeze for GhApiClient
impl !RefUnwindSafe for GhApiClient
impl Send for GhApiClient
impl Sync for GhApiClient
impl Unpin for GhApiClient
impl !UnwindSafe for GhApiClient
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)