pub struct Remote { /* private fields */ }Expand description
A registry, reached at base (https://127.0.0.1:5480).
Implementations§
Source§impl Remote
impl Remote
Sourcepub fn new(
base: &str,
ca_pem: Option<&str>,
timeout: Duration,
) -> Result<Remote>
pub fn new( base: &str, ca_pem: Option<&str>, timeout: Duration, ) -> Result<Remote>
ca_pem: the one CA to trust (none: the platform’s roots, or plain
http in tests).
pub fn base(&self) -> &str
Sourcepub fn put_blob(
&self,
repo: &str,
digest: &str,
size: u64,
body: &mut dyn Read,
) -> Result<bool>
pub fn put_blob( &self, repo: &str, digest: &str, size: u64, body: &mut dyn Read, ) -> Result<bool>
Upload one blob, monolithically, unless the repository has it. Returns whether it was uploaded.
Sourcepub fn put_manifest(
&self,
repo: &str,
reference: &str,
media_type: &str,
bytes: &[u8],
) -> Result<String>
pub fn put_manifest( &self, repo: &str, reference: &str, media_type: &str, bytes: &[u8], ) -> Result<String>
Put a manifest under reference (a tag or its digest). Returns the
digest the registry gives it.
Sourcepub fn push(
&self,
layout: &Layout,
repo: &str,
tag: &str,
log: &mut dyn FnMut(&str),
) -> Result<String>
pub fn push( &self, layout: &Layout, repo: &str, tag: &str, log: &mut dyn FnMut(&str), ) -> Result<String>
Push the layout’s image as repo:tag. Returns its manifest digest.
Sourcepub fn resolve(&self, repo: &str, reference: &str) -> Result<Option<String>>
pub fn resolve(&self, repo: &str, reference: &str) -> Result<Option<String>>
The digest reference (a tag or a digest) names, or None.
Sourcepub fn get_manifest(
&self,
repo: &str,
digest: &str,
) -> Result<Option<(String, Vec<u8>)>>
pub fn get_manifest( &self, repo: &str, digest: &str, ) -> Result<Option<(String, Vec<u8>)>>
A manifest’s media type and bytes, checked against its digest.
A repository’s tags (none when it does not exist).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Remote
impl !UnwindSafe for Remote
impl Freeze for Remote
impl Send for Remote
impl Sync for Remote
impl Unpin for Remote
impl UnsafeUnpin for Remote
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