pub struct ImageId(/* private fields */);Expand description
A container image identifier: sha256: and 64 lower-case hex digits.
This is the image ID the tenant daemon reports, never a tag or a repository digest. “The same image” means the same image ID.
§Examples
use stratum_node_core::ImageId;
let id: ImageId = format!("sha256:{}", "ab".repeat(32)).parse()?;
assert_eq!(id.hex(), "ab".repeat(32));
assert!("sha256:AB".parse::<ImageId>().is_err());
assert!("ab".repeat(32).parse::<ImageId>().is_err());Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ImageId
impl<'de> Deserialize<'de> for ImageId
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ImageId
Source§impl Ord for ImageId
impl Ord for ImageId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ImageId
impl PartialOrd for ImageId
impl StructuralPartialEq for ImageId
Auto Trait Implementations§
impl Forget for ImageId
impl Freeze for ImageId
impl Move for ImageId
impl RefUnwindSafe for ImageId
impl Send for ImageIdwhere
RawVecInner: Send,
impl Sync for ImageIdwhere
RawVecInner: Sync,
impl Unpin for ImageId
impl UnsafeUnpin for ImageId
impl UnwindSafe for ImageIdwhere
RawVecInner: UnwindSafe,
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