Struct oci_spec::image::ImageConfigurationBuilder

source ·
pub struct ImageConfigurationBuilder { /* private fields */ }
Expand description

Builder for ImageConfiguration.

Implementations§

source§

impl ImageConfigurationBuilder

source

pub fn created<VALUE: Into<String>>(self, value: VALUE) -> Self

An combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6.

source

pub fn author<VALUE: Into<String>>(self, value: VALUE) -> Self

Gives the name and/or email address of the person or entity which created and is responsible for maintaining the image.

source

pub fn architecture<VALUE: Into<Arch>>(self, value: VALUE) -> Self

The CPU architecture which the binaries in this image are built to run on. Configurations SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOARCH.

source

pub fn os<VALUE: Into<Os>>(self, value: VALUE) -> Self

The name of the operating system which the image is built to run on. Configurations SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOOS.

source

pub fn os_version<VALUE: Into<String>>(self, value: VALUE) -> Self

This OPTIONAL property specifies the version of the operating system targeted by the referenced blob. Implementations MAY refuse to use manifests where os.version is not known to work with the host OS version. Valid values are implementation-defined. e.g. 10.0.14393.1066 on windows.

source

pub fn os_features<VALUE: Into<Vec<String>>>(self, value: VALUE) -> Self

This OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature. When os is windows, image indexes SHOULD use, and implementations SHOULD understand the following values:

  • win32k: image requires win32k.sys on the host (Note: win32k.sys is missing on Nano Server)
source

pub fn variant<VALUE: Into<String>>(self, value: VALUE) -> Self

The variant of the specified CPU architecture. Configurations SHOULD use, and implementations SHOULD understand, variant values listed in the Platform Variants table.

source

pub fn config<VALUE: Into<Config>>(self, value: VALUE) -> Self

The execution parameters which SHOULD be used as a base when running a container using the image. This field can be None, in which case any execution parameters should be specified at creation of the container.

source

pub fn rootfs<VALUE: Into<RootFs>>(self, value: VALUE) -> Self

The rootfs key references the layer content addresses used by the image. This makes the image config hash depend on the filesystem hash.

source

pub fn history<VALUE: Into<Vec<History>>>(self, value: VALUE) -> Self

Describes the history of each layer. The array is ordered from first to last.

source

pub fn build(self) -> Result<ImageConfiguration, OciSpecError>

Builds a new ImageConfiguration.

§Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl Default for ImageConfigurationBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.