pub struct DockerImageReference { /* private fields */ }Expand description
A conservatively parsed Docker image reference.
Implementations§
Source§impl DockerImageReference
impl DockerImageReference
Sourcepub fn parse(
value: impl AsRef<str>,
) -> Result<DockerImageReference, DockerImageReferenceError>
pub fn parse( value: impl AsRef<str>, ) -> Result<DockerImageReference, DockerImageReferenceError>
Parses a Docker image reference.
Sourcepub fn namespace(&self) -> Option<&str>
pub fn namespace(&self) -> Option<&str>
Returns the slash-separated namespace before the repository name.
Sourcepub fn repository(&self) -> &str
pub fn repository(&self) -> &str
Returns the repository name.
Trait Implementations§
Source§impl AsRef<str> for DockerImageReference
impl AsRef<str> for DockerImageReference
Source§impl Clone for DockerImageReference
impl Clone for DockerImageReference
Source§fn clone(&self) -> DockerImageReference
fn clone(&self) -> DockerImageReference
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 DockerImageReference
impl Debug for DockerImageReference
Source§impl Display for DockerImageReference
impl Display for DockerImageReference
Source§impl FromStr for DockerImageReference
impl FromStr for DockerImageReference
Source§type Err = DockerImageReferenceError
type Err = DockerImageReferenceError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<DockerImageReference, <DockerImageReference as FromStr>::Err>
fn from_str( value: &str, ) -> Result<DockerImageReference, <DockerImageReference as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for DockerImageReference
impl Hash for DockerImageReference
Source§impl Ord for DockerImageReference
impl Ord for DockerImageReference
Source§fn cmp(&self, other: &DockerImageReference) -> Ordering
fn cmp(&self, other: &DockerImageReference) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DockerImageReference
impl PartialEq for DockerImageReference
Source§fn eq(&self, other: &DockerImageReference) -> bool
fn eq(&self, other: &DockerImageReference) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DockerImageReference
impl PartialOrd for DockerImageReference
Source§impl TryFrom<&str> for DockerImageReference
impl TryFrom<&str> for DockerImageReference
Source§type Error = DockerImageReferenceError
type Error = DockerImageReferenceError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<DockerImageReference, <DockerImageReference as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<DockerImageReference, <DockerImageReference as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for DockerImageReference
impl StructuralPartialEq for DockerImageReference
Auto Trait Implementations§
impl Freeze for DockerImageReference
impl RefUnwindSafe for DockerImageReference
impl Send for DockerImageReference
impl Sync for DockerImageReference
impl Unpin for DockerImageReference
impl UnsafeUnpin for DockerImageReference
impl UnwindSafe for DockerImageReference
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