pub struct OciPlatform { /* private fields */ }Expand description
OCI platform metadata.
Implementations§
Source§impl OciPlatform
impl OciPlatform
Sourcepub fn new(os: OciOs, architecture: OciArchitecture) -> Self
pub fn new(os: OciOs, architecture: OciArchitecture) -> Self
Creates platform metadata from OS and architecture labels.
Sourcepub fn with_variant(
self,
variant: impl AsRef<str>,
) -> Result<Self, PlatformError>
pub fn with_variant( self, variant: impl AsRef<str>, ) -> Result<Self, PlatformError>
Adds an architecture variant.
Sourcepub fn with_os_version(
self,
version: impl AsRef<str>,
) -> Result<Self, PlatformError>
pub fn with_os_version( self, version: impl AsRef<str>, ) -> Result<Self, PlatformError>
Adds an OS version label.
Sourcepub fn with_os_feature(
self,
feature: impl AsRef<str>,
) -> Result<Self, PlatformError>
pub fn with_os_feature( self, feature: impl AsRef<str>, ) -> Result<Self, PlatformError>
Adds an OS feature label.
Sourcepub const fn architecture(&self) -> &OciArchitecture
pub const fn architecture(&self) -> &OciArchitecture
Returns the architecture label.
Sourcepub const fn variant(&self) -> Option<&PlatformVariant>
pub const fn variant(&self) -> Option<&PlatformVariant>
Returns the optional variant.
Sourcepub fn os_features(&self) -> &[OsFeature]
pub fn os_features(&self) -> &[OsFeature]
Returns OS features.
Trait Implementations§
Source§impl Clone for OciPlatform
impl Clone for OciPlatform
Source§fn clone(&self) -> OciPlatform
fn clone(&self) -> OciPlatform
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 OciPlatform
impl Debug for OciPlatform
Source§impl Display for OciPlatform
impl Display for OciPlatform
Source§impl FromStr for OciPlatform
impl FromStr for OciPlatform
Source§impl Hash for OciPlatform
impl Hash for OciPlatform
Source§impl Ord for OciPlatform
impl Ord for OciPlatform
Source§fn cmp(&self, other: &OciPlatform) -> Ordering
fn cmp(&self, other: &OciPlatform) -> 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 OciPlatform
impl PartialEq for OciPlatform
Source§fn eq(&self, other: &OciPlatform) -> bool
fn eq(&self, other: &OciPlatform) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for OciPlatform
impl PartialOrd for OciPlatform
impl Eq for OciPlatform
impl StructuralPartialEq for OciPlatform
Auto Trait Implementations§
impl Freeze for OciPlatform
impl RefUnwindSafe for OciPlatform
impl Send for OciPlatform
impl Sync for OciPlatform
impl Unpin for OciPlatform
impl UnsafeUnpin for OciPlatform
impl UnwindSafe for OciPlatform
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