pub struct Platform { /* private fields */ }
Expand description
Describes the minimum runtime requirements of the image.
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn architecture(&self) -> &Arch
pub fn architecture(&self) -> &Arch
This REQUIRED property specifies the CPU architecture. Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOARCH.
Sourcepub fn os(&self) -> &Os
pub fn os(&self) -> &Os
This REQUIRED property specifies the operating system. Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOOS.
Sourcepub fn os_version(&self) -> &Option<String>
pub fn os_version(&self) -> &Option<String>
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.
Sourcepub fn os_features(&self) -> &Option<Vec<String>>
pub fn os_features(&self) -> &Option<Vec<String>>
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)
When os is not windows, values are implementation-defined and SHOULD be submitted to this specification for standardization.
Sourcepub fn variant(&self) -> &Option<String>
pub fn variant(&self) -> &Option<String>
This OPTIONAL property specifies the variant of the CPU. Image indexes SHOULD use, and implementations SHOULD understand, variant values listed in the [Platform Variants] (https://github.com/opencontainers/image-spec/blob/main/image-index.md#platform-variants) table.
Source§impl Platform
impl Platform
Sourcepub fn set_architecture(&mut self, val: Arch) -> &mut Self
pub fn set_architecture(&mut self, val: Arch) -> &mut Self
This REQUIRED property specifies the CPU architecture. Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOARCH.
Sourcepub fn set_os(&mut self, val: Os) -> &mut Self
pub fn set_os(&mut self, val: Os) -> &mut Self
This REQUIRED property specifies the operating system. Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for GOOS.
Sourcepub fn set_os_version(&mut self, val: Option<String>) -> &mut Self
pub fn set_os_version(&mut self, val: Option<String>) -> &mut 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.
Sourcepub fn set_os_features(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_os_features(&mut self, val: Option<Vec<String>>) -> &mut 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)
When os is not windows, values are implementation-defined and SHOULD be submitted to this specification for standardization.
Sourcepub fn set_variant(&mut self, val: Option<String>) -> &mut Self
pub fn set_variant(&mut self, val: Option<String>) -> &mut Self
This OPTIONAL property specifies the variant of the CPU. Image indexes SHOULD use, and implementations SHOULD understand, variant values listed in the [Platform Variants] (https://github.com/opencontainers/image-spec/blob/main/image-index.md#platform-variants) table.
Sourcepub fn set_features(&mut self, val: Option<Vec<String>>) -> &mut Self
pub fn set_features(&mut self, val: Option<Vec<String>>) -> &mut Self
This property is RESERVED for future versions of the specification.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Platform
impl<'de> Deserialize<'de> for Platform
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Platform
impl StructuralPartialEq for Platform
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnwindSafe for Platform
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)