pub struct HttpRegistryClient { /* private fields */ }Expand description
Lightweight HTTP registry client that operates on a raw base-URL.
Use crate::HttpRegistryClient for the full Registry-aware client with
sparse-index visibility checks, readiness backoff, etc.
Implementations§
Source§impl HttpRegistryClient
impl HttpRegistryClient
Sourcepub fn with_cache_dir(self, cache_dir: PathBuf) -> Self
pub fn with_cache_dir(self, cache_dir: PathBuf) -> Self
Set the cache directory for sparse index fragments
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the request timeout
Sourcepub fn crate_exists(&self, name: &str) -> Result<bool>
pub fn crate_exists(&self, name: &str) -> Result<bool>
Check if a crate exists in the registry
Sourcepub fn version_exists(&self, name: &str, version: &str) -> Result<bool>
pub fn version_exists(&self, name: &str, version: &str) -> Result<bool>
Check if a specific version of a crate exists
Sourcepub fn list_owners(&self, name: &str, token: &str) -> Result<OwnersResponse>
pub fn list_owners(&self, name: &str, token: &str) -> Result<OwnersResponse>
List owners for a crate with token-aware lookup.
Sourcepub fn is_owner(&self, name: &str, username: &str) -> Result<bool>
pub fn is_owner(&self, name: &str, username: &str) -> Result<bool>
Check if a user is an owner of a crate
Sourcepub fn is_version_visible_in_sparse_index(
&self,
index_base: &str,
name: &str,
version: &str,
) -> Result<bool>
pub fn is_version_visible_in_sparse_index( &self, index_base: &str, name: &str, version: &str, ) -> Result<bool>
Check if a version exists in sparse-index metadata.
Trait Implementations§
Source§impl Clone for HttpRegistryClient
impl Clone for HttpRegistryClient
Source§fn clone(&self) -> HttpRegistryClient
fn clone(&self) -> HttpRegistryClient
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 Freeze for HttpRegistryClient
impl !RefUnwindSafe for HttpRegistryClient
impl Send for HttpRegistryClient
impl Sync for HttpRegistryClient
impl Unpin for HttpRegistryClient
impl UnsafeUnpin for HttpRegistryClient
impl !UnwindSafe for HttpRegistryClient
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