Struct OciPlatform
pub struct OciPlatform { /* private fields */ }Expand description
OCI platform metadata.
Implementations§
§impl OciPlatform
impl OciPlatform
pub fn new(os: OciOs, architecture: OciArchitecture) -> OciPlatform
pub fn new(os: OciOs, architecture: OciArchitecture) -> OciPlatform
Creates platform metadata from OS and architecture labels.
pub fn with_variant(
self,
variant: impl AsRef<str>,
) -> Result<OciPlatform, PlatformError>
pub fn with_variant( self, variant: impl AsRef<str>, ) -> Result<OciPlatform, PlatformError>
Adds an architecture variant.
pub fn with_os_version(
self,
version: impl AsRef<str>,
) -> Result<OciPlatform, PlatformError>
pub fn with_os_version( self, version: impl AsRef<str>, ) -> Result<OciPlatform, PlatformError>
Adds an OS version label.
pub fn with_os_feature(
self,
feature: impl AsRef<str>,
) -> Result<OciPlatform, PlatformError>
pub fn with_os_feature( self, feature: impl AsRef<str>, ) -> Result<OciPlatform, PlatformError>
Adds an OS feature label.
pub const fn architecture(&self) -> &OciArchitecture
pub const fn architecture(&self) -> &OciArchitecture
Returns the architecture label.
pub fn os_features(&self) -> &[OsFeature]
pub fn os_features(&self) -> &[OsFeature]
Returns OS features.
Trait Implementations§
§impl Clone for OciPlatform
impl Clone for OciPlatform
§fn clone(&self) -> OciPlatform
fn clone(&self) -> OciPlatform
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for OciPlatform
impl Debug for OciPlatform
§impl Display for OciPlatform
impl Display for OciPlatform
§impl FromStr for OciPlatform
impl FromStr for OciPlatform
§impl Hash for OciPlatform
impl Hash for OciPlatform
§impl Ord for OciPlatform
impl Ord for OciPlatform
§impl PartialEq for OciPlatform
impl PartialEq for OciPlatform
§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