pub struct ImageReference { /* private fields */ }Expand description
A preserved image reference with optional tag and digest components.
Unlike a strict OCI-only parser, this type deliberately accepts the common
name:tag@algorithm:digest form used by Docker Compose and Podman.
Implementations§
Source§impl ImageReference
impl ImageReference
Sourcepub fn parse(authored: impl Into<String>) -> Result<Self, ModelError>
pub fn parse(authored: impl Into<String>) -> Result<Self, ModelError>
Parses a preserved image reference without normalizing its spelling.
§Errors
Returns a ModelError for empty components, multiple digest
separators, or embedded NUL bytes.
Sourcepub fn repository(&self) -> &str
pub fn repository(&self) -> &str
Returns the repository/name component without tag or digest.
Trait Implementations§
Source§impl Clone for ImageReference
impl Clone for ImageReference
Source§fn clone(&self) -> ImageReference
fn clone(&self) -> ImageReference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageReference
impl Debug for ImageReference
impl Eq for ImageReference
Source§impl PartialEq for ImageReference
impl PartialEq for ImageReference
impl StructuralPartialEq for ImageReference
Auto Trait Implementations§
impl Freeze for ImageReference
impl RefUnwindSafe for ImageReference
impl Send for ImageReference
impl Sync for ImageReference
impl Unpin for ImageReference
impl UnsafeUnpin for ImageReference
impl UnwindSafe for ImageReference
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