mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
docstrings for things that I was curious about
This commit is contained in:
parent
a88335d05b
commit
ae13308dec
2 changed files with 9 additions and 0 deletions
|
@ -24,6 +24,9 @@ use crate::FetchError;
|
||||||
static WARN_RATE_LIMIT_ONCE: Once = Once::new();
|
static WARN_RATE_LIMIT_ONCE: Once = Once::new();
|
||||||
static WARN_UNAUTHORIZED_ONCE: Once = Once::new();
|
static WARN_UNAUTHORIZED_ONCE: Once = Once::new();
|
||||||
|
|
||||||
|
/// Return Ok(Some(api_artifact_url)) if exists, or Ok(None) if it doesn't.
|
||||||
|
///
|
||||||
|
/// Caches info on all artifacts matching (repo, tag).
|
||||||
pub(super) async fn get_gh_release_artifact_url(
|
pub(super) async fn get_gh_release_artifact_url(
|
||||||
gh_api_client: GhApiClient,
|
gh_api_client: GhApiClient,
|
||||||
artifact: GhReleaseArtifact,
|
artifact: GhReleaseArtifact,
|
||||||
|
@ -54,6 +57,10 @@ pub(super) async fn get_gh_release_artifact_url(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Check if the URL exists by querying the GitHub API.
|
||||||
|
///
|
||||||
|
/// Caches info on all artifacts matching (repo, tag).
|
||||||
|
///
|
||||||
/// This function returns a future where its size should be at most size of
|
/// This function returns a future where its size should be at most size of
|
||||||
/// 2-4 pointers.
|
/// 2-4 pointers.
|
||||||
pub(super) async fn does_url_exist(
|
pub(super) async fn does_url_exist(
|
||||||
|
|
|
@ -247,6 +247,8 @@ pub struct GhReleaseArtifactUrl(Url);
|
||||||
|
|
||||||
impl GhApiClient {
|
impl GhApiClient {
|
||||||
/// Return `Ok(Some(api_artifact_url))` if exists.
|
/// Return `Ok(Some(api_artifact_url))` if exists.
|
||||||
|
///
|
||||||
|
/// Caches info on all artifacts matching (repo, tag).
|
||||||
///
|
///
|
||||||
/// The returned future is guaranteed to be pointer size.
|
/// The returned future is guaranteed to be pointer size.
|
||||||
#[instrument(skip(self), ret(level = Level::DEBUG))]
|
#[instrument(skip(self), ret(level = Level::DEBUG))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue