pub struct Platform {
pub architecture: String,
pub os: String,
pub os_version: Option<String>,
pub os_features: Vec<String>,
pub variant: Option<String>,
pub features: Vec<String>,
}Expand description
Platform specification for multi-arch images.
Fields§
§architecture: StringThe CPU architecture.
os: StringThe operating system.
os_version: Option<String>Optional OS version.
os_features: Vec<String>Optional OS features.
variant: Option<String>Optional architecture variant.
features: Vec<String>Optional features (Docker manifest list extension).
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn new(architecture: impl Into<String>, os: impl Into<String>) -> Self
pub fn new(architecture: impl Into<String>, os: impl Into<String>) -> Self
Creates a new platform specification.
Sourcepub fn with_variant(self, variant: impl Into<String>) -> Self
pub fn with_variant(self, variant: impl Into<String>) -> Self
Sets the variant for the platform.
Sourcepub fn with_os_version(self, version: impl Into<String>) -> Self
pub fn with_os_version(self, version: impl Into<String>) -> Self
Sets the OS version.
Sourcepub fn with_os_feature(self, feature: impl Into<String>) -> Self
pub fn with_os_feature(self, feature: impl Into<String>) -> Self
Adds an OS feature.
Sourcepub fn with_feature(self, feature: impl Into<String>) -> Self
pub fn with_feature(self, feature: impl Into<String>) -> Self
Adds a feature (Docker extension).
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>,
Deserialize this value from the given Serde deserializer. Read more
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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more