pub struct DockerLabel { /* private fields */ }Expand description
A Docker label key/value pair.
Implementations§
Source§impl DockerLabel
impl DockerLabel
Sourcepub fn new(
key: DockerLabelKey,
value: impl AsRef<str>,
) -> Result<DockerLabel, DockerLabelError>
pub fn new( key: DockerLabelKey, value: impl AsRef<str>, ) -> Result<DockerLabel, DockerLabelError>
Creates a Docker label.
Sourcepub fn oci_title(
value: impl AsRef<str>,
) -> Result<DockerLabel, DockerLabelError>
pub fn oci_title( value: impl AsRef<str>, ) -> Result<DockerLabel, DockerLabelError>
Creates a common OCI title label.
Sourcepub const fn key(&self) -> &DockerLabelKey
pub const fn key(&self) -> &DockerLabelKey
Returns the label key.
Trait Implementations§
Source§impl Clone for DockerLabel
impl Clone for DockerLabel
Source§fn clone(&self) -> DockerLabel
fn clone(&self) -> DockerLabel
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 DockerLabel
impl Debug for DockerLabel
Source§impl Display for DockerLabel
impl Display for DockerLabel
Source§impl Hash for DockerLabel
impl Hash for DockerLabel
Source§impl Ord for DockerLabel
impl Ord for DockerLabel
Source§fn cmp(&self, other: &DockerLabel) -> Ordering
fn cmp(&self, other: &DockerLabel) -> 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 DockerLabel
impl PartialEq for DockerLabel
Source§fn eq(&self, other: &DockerLabel) -> bool
fn eq(&self, other: &DockerLabel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DockerLabel
impl PartialOrd for DockerLabel
impl Eq for DockerLabel
impl StructuralPartialEq for DockerLabel
Auto Trait Implementations§
impl Freeze for DockerLabel
impl RefUnwindSafe for DockerLabel
impl Send for DockerLabel
impl Sync for DockerLabel
impl Unpin for DockerLabel
impl UnsafeUnpin for DockerLabel
impl UnwindSafe for DockerLabel
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