pub struct RegistrySource { /* private fields */ }Expand description
Pull-only OCI distribution client implementing LayerSource.
Implementations§
Source§impl RegistrySource
impl RegistrySource
pub fn new(reference: RegistryRef) -> Self
pub fn parse(reference: &str) -> Result<Self, SourceError>
Sourcepub fn with_credential(self, username: &str, password: &str) -> Self
pub fn with_credential(self, username: &str, password: &str) -> Self
Use this credential instead of consulting the environment. Sent as HTTP Basic to the token realm only.
Trait Implementations§
Source§impl Debug for RegistrySource
impl Debug for RegistrySource
Source§impl LayerSource for RegistrySource
impl LayerSource for RegistrySource
Source§fn fetch_manifest(&self, layer: &LayerRef) -> Result<Vec<u8>, SourceError>
fn fetch_manifest(&self, layer: &LayerRef) -> Result<Vec<u8>, SourceError>
Fetch the manifest bytes for a layer reference.
Source§fn fetch_line_status(
&self,
layer: &LayerRef,
) -> Result<Option<Vec<u8>>, SourceError>
fn fetch_line_status( &self, layer: &LayerRef, ) -> Result<Option<Vec<u8>>, SourceError>
Fetch the baseline line-status DSSE envelope this source carries
beside the layer, if any (REQ-STATUS-DIST-001). Returns the opaque
envelope bytes — the source is not trusted to have verified them;
the caller re-verifies against the trust root before caching. A
source that carries no baseline returns
Ok(None), which is not an
error: line-status is updatable evidence, absent on some layers.Source§fn fetch_line_index(&self, line: &str) -> Result<Option<Vec<u8>>, SourceError>
fn fetch_line_index(&self, line: &str) -> Result<Option<Vec<u8>>, SourceError>
Fetch the realm’s signed line-index envelope for this line, if the
source carries one (REQ-INDEXAUTH-001). Same contract as
fetch_line_status: opaque bytes, re-verified by the caller against
the trust root. The source is never trusted to have checked it — it is
precisely the party this document exists to constrain.Source§fn served_layers(&self, line: &str) -> Result<Option<Vec<String>>, SourceError>
fn served_layers(&self, line: &str) -> Result<Option<Vec<String>>, SourceError>
The layer ids this source is willing to serve for a line. Used to
detect OMISSION against the signed index. A source that cannot
enumerate returns
Ok(None) — distinct from Ok(Some(vec![])), which
means “I enumerate, and I have nothing”, and would flag every indexed
layer as hidden.Source§fn fetch_attestations(
&self,
layer: &LayerRef,
) -> Result<Vec<CarriedAttestation>, SourceError>
fn fetch_attestations( &self, layer: &LayerRef, ) -> Result<Vec<CarriedAttestation>, SourceError>
Fetch the attestations this source carries beside the layer as
referrer artifacts (REQ-ATTEST-002). Same contract as
fetch_line_status: OPAQUE, UNTRUSTED bytes. The source is never
trusted to have verified a statement — it is the party that would
benefit from a forged one — so the caller persists them verbatim and
varve verify re-checks each against the trust root. Read moreSource§fn fetch_blob(&self, digest: &str) -> Result<Vec<u8>, SourceError>
fn fetch_blob(&self, digest: &str) -> Result<Vec<u8>, SourceError>
Fetch a blob (a tool binary) by its digest (
sha256:<hex>).Auto Trait Implementations§
impl !Freeze for RegistrySource
impl !RefUnwindSafe for RegistrySource
impl !Sync for RegistrySource
impl !UnwindSafe for RegistrySource
impl Send for RegistrySource
impl Unpin for RegistrySource
impl UnsafeUnpin for RegistrySource
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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