pub struct DockerPlatform { /* private fields */ }Expand description
A Docker platform triple-like value.
Implementations§
Source§impl DockerPlatform
impl DockerPlatform
Sourcepub fn new(
os: impl AsRef<str>,
architecture: impl AsRef<str>,
) -> Result<DockerPlatform, DockerBuildError>
pub fn new( os: impl AsRef<str>, architecture: impl AsRef<str>, ) -> Result<DockerPlatform, DockerBuildError>
Creates a platform from OS and architecture labels.
Sourcepub fn with_variant(
self,
variant: impl AsRef<str>,
) -> Result<DockerPlatform, DockerBuildError>
pub fn with_variant( self, variant: impl AsRef<str>, ) -> Result<DockerPlatform, DockerBuildError>
Adds a variant label.
Sourcepub fn architecture(&self) -> &str
pub fn architecture(&self) -> &str
Returns the architecture label.
Trait Implementations§
Source§impl Clone for DockerPlatform
impl Clone for DockerPlatform
Source§fn clone(&self) -> DockerPlatform
fn clone(&self) -> DockerPlatform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DockerPlatform
impl Debug for DockerPlatform
Source§impl Display for DockerPlatform
impl Display for DockerPlatform
Source§impl FromStr for DockerPlatform
impl FromStr for DockerPlatform
Source§type Err = DockerBuildError
type Err = DockerBuildError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<DockerPlatform, <DockerPlatform as FromStr>::Err>
fn from_str( value: &str, ) -> Result<DockerPlatform, <DockerPlatform as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for DockerPlatform
impl Hash for DockerPlatform
Source§impl Ord for DockerPlatform
impl Ord for DockerPlatform
Source§fn cmp(&self, other: &DockerPlatform) -> Ordering
fn cmp(&self, other: &DockerPlatform) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DockerPlatform
impl PartialEq for DockerPlatform
Source§fn eq(&self, other: &DockerPlatform) -> bool
fn eq(&self, other: &DockerPlatform) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DockerPlatform
impl PartialOrd for DockerPlatform
impl Eq for DockerPlatform
impl StructuralPartialEq for DockerPlatform
Auto Trait Implementations§
impl Freeze for DockerPlatform
impl RefUnwindSafe for DockerPlatform
impl Send for DockerPlatform
impl Sync for DockerPlatform
impl Unpin for DockerPlatform
impl UnsafeUnpin for DockerPlatform
impl UnwindSafe for DockerPlatform
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