#[non_exhaustive]pub struct InfrastructureSpec {
pub resources: Option<Resources>,
pub runtime: Option<Runtime>,
/* private fields */
}Expand description
Configuration for the underlying infrastructure used to run workloads.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resources: Option<Resources>Hardware config
runtime: Option<Runtime>Software config
Implementations§
Source§impl InfrastructureSpec
impl InfrastructureSpec
pub fn new() -> Self
Sourcepub fn set_resources<T: Into<Option<Resources>>>(self, v: T) -> Self
pub fn set_resources<T: Into<Option<Resources>>>(self, v: T) -> Self
Sets the value of resources.
Note that all the setters affecting resources are mutually
exclusive.
Sourcepub fn compute(&self) -> Option<&Box<ComputeResources>>
pub fn compute(&self) -> Option<&Box<ComputeResources>>
The value of resources
if it holds a Compute, None if the field is not set or
holds a different branch.
Sourcepub fn set_compute<T: Into<Box<ComputeResources>>>(self, v: T) -> Self
pub fn set_compute<T: Into<Box<ComputeResources>>>(self, v: T) -> Self
Sets the value of resources
to hold a Compute.
Note that all the setters affecting resources are
mutually exclusive.
Sourcepub fn set_runtime<T: Into<Option<Runtime>>>(self, v: T) -> Self
pub fn set_runtime<T: Into<Option<Runtime>>>(self, v: T) -> Self
Sets the value of runtime.
Note that all the setters affecting runtime are mutually
exclusive.
Sourcepub fn os_image(&self) -> Option<&Box<OsImageRuntime>>
pub fn os_image(&self) -> Option<&Box<OsImageRuntime>>
The value of runtime
if it holds a OsImage, None if the field is not set or
holds a different branch.
Sourcepub fn set_os_image<T: Into<Box<OsImageRuntime>>>(self, v: T) -> Self
pub fn set_os_image<T: Into<Box<OsImageRuntime>>>(self, v: T) -> Self
Sets the value of runtime
to hold a OsImage.
Note that all the setters affecting runtime are
mutually exclusive.
Trait Implementations§
Source§impl Clone for InfrastructureSpec
impl Clone for InfrastructureSpec
Source§fn clone(&self) -> InfrastructureSpec
fn clone(&self) -> InfrastructureSpec
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 moreSource§impl Debug for InfrastructureSpec
impl Debug for InfrastructureSpec
Source§impl Default for InfrastructureSpec
impl Default for InfrastructureSpec
Source§fn default() -> InfrastructureSpec
fn default() -> InfrastructureSpec
Returns the “default value” for a type. Read more
Source§impl Message for InfrastructureSpec
impl Message for InfrastructureSpec
Source§impl PartialEq for InfrastructureSpec
impl PartialEq for InfrastructureSpec
impl StructuralPartialEq for InfrastructureSpec
Auto Trait Implementations§
impl Freeze for InfrastructureSpec
impl RefUnwindSafe for InfrastructureSpec
impl Send for InfrastructureSpec
impl Sync for InfrastructureSpec
impl Unpin for InfrastructureSpec
impl UnwindSafe for InfrastructureSpec
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