pub(crate) enum OciReference {
Digest(OciDigest),
Named(String),
}Expand description
A reference to an OCI image: either a content digest or a named ref.
Digests are prefixed with @ (e.g. @sha256:abc123…), while bare
names are refs resolved through the repository’s ref tree. The @
prefix is necessary to disambiguate because ref names may contain :
— OCI digest algorithms are intentionally extensible, so we cannot
rely on parse heuristics to distinguish the two.
Note this differs from the podman/docker convention where @ appears
between the image name and the digest (e.g. fedora@sha256:abc…).
Here, @ is always a leading prefix on the entire argument.
At the repository level, ref names are freeform strings (the only
restriction is that they must not start with @). In practice,
oci pull defaults to tagging with the source transport reference
(e.g. docker://quay.io/fedora/fedora:latest), so most refs in a
repository will be container transport names — which naturally never
start with @.
Variants§
Digest(OciDigest)
A content-addressable digest such as sha256:abcdef….
Named(String)
A named ref resolved through the repository’s ref tree, typically
a container transport name (e.g. docker://quay.io/foo:latest).
Trait Implementations§
Source§impl Clone for OciReference
impl Clone for OciReference
Source§fn clone(&self) -> OciReference
fn clone(&self) -> OciReference
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OciReference
impl Debug for OciReference
Source§impl Display for OciReference
Available on crate feature oci only.
impl Display for OciReference
oci only.Auto Trait Implementations§
impl Freeze for OciReference
impl RefUnwindSafe for OciReference
impl Send for OciReference
impl Sync for OciReference
impl Unpin for OciReference
impl UnsafeUnpin for OciReference
impl UnwindSafe for OciReference
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more