oci_spec::image

Struct 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>,

Source§

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>,

Source§

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.