Struct ostree_ext::container::ImageReference[][src]

pub struct ImageReference {
    pub transport: Transport,
    pub name: String,
}
Expand description

Combination of a remote image reference and transport.

For example,

Fields

transport: Transport

The storage and transport for the image

name: String

The 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");

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.