Struct ostree_ext::container::ImageReference [−][src]
Expand description
Combination of a remote image reference and transport.
For example,
Fields
transport: TransportThe storage and transport for the image
name: StringThe image name (e.g. quay.io/somerepo/someimage:latest)
Implementations
Create a new ImageReference that refers to a specific digest.
use std::convert::TryInto; let r: ostree_ext::container::ImageReference = "docker://quay.io/exampleos/exampleos:latest".try_into().unwrap(); let n = r.with_digest("sha256:41af286dc0b172ed2f1ca934fd2278de4a1192302ffa07087cea2682e7d372e3"); assert_eq!(n.name, "quay.io/exampleos/exampleos@sha256:41af286dc0b172ed2f1ca934fd2278de4a1192302ffa07087cea2682e7d372e3");