Struct docker_registry::v2::Client
source · pub struct Client { /* private fields */ }Expand description
A Client to make outgoing API requests to a registry.
Implementations§
source§impl Client
impl Client
sourcepub async fn authenticate(self, scopes: &[&str]) -> Result<Self>
pub async fn authenticate(self, scopes: &[&str]) -> Result<Self>
Perform registry authentication and return the authenticated client.
If Bearer authentication is used the returned client will be authorized for the requested scopes.
source§impl Client
impl Client
sourcepub async fn get_manifest(
&self,
name: &str,
reference: &str,
) -> Result<Manifest>
pub async fn get_manifest( &self, name: &str, reference: &str, ) -> Result<Manifest>
Fetch an image manifest.
The name and reference parameters identify the image. The reference may be either a tag or digest.
sourcepub async fn get_manifest_and_ref(
&self,
name: &str,
reference: &str,
) -> Result<(Manifest, Option<String>)>
pub async fn get_manifest_and_ref( &self, name: &str, reference: &str, ) -> Result<(Manifest, Option<String>)>
Fetch an image manifest and return it with its digest.
The name and reference parameters identify the image. The reference may be either a tag or digest.
sourcepub async fn get_manifestref(
&self,
name: &str,
reference: &str,
) -> Result<Option<String>>
pub async fn get_manifestref( &self, name: &str, reference: &str, ) -> Result<Option<String>>
Fetch content digest for a particular tag.
sourcepub async fn has_manifest(
&self,
name: &str,
reference: &str,
mediatypes: Option<&[&str]>,
) -> Result<Option<MediaTypes>>
pub async fn has_manifest( &self, name: &str, reference: &str, mediatypes: Option<&[&str]>, ) -> Result<Option<MediaTypes>>
Check if an image manifest exists.
The name and reference parameters identify the image. The reference may be either a tag or digest.
source§impl Client
impl Client
pub async fn get_blob_response( &self, name: &str, digest: &str, ) -> Result<BlobResponse>
source§impl Client
impl Client
pub fn configure() -> Config
sourcepub async fn ensure_v2_registry(self) -> Result<Self>
pub async fn ensure_v2_registry(self) -> Result<Self>
Ensure remote registry supports v2 API.
sourcepub async fn is_v2_supported(&self) -> Result<bool>
pub async fn is_v2_supported(&self) -> Result<bool>
Check whether remote registry supports v2 API.
Check whether remote registry supports v2 API and self is authorized.
Authorized means to successfully GET the /v2 endpoint on the remote registry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)