#[non_exhaustive]pub struct AcceleratorConfig {
pub type: AcceleratorType,
pub core_count: i64,
/* private fields */
}Expand description
An accelerator configuration for a VM instance
Definition of a hardware accelerator. Note that there is no check on type
and core_count combinations. TPUs are not supported.
See GPUs on Compute
Engine to find a
valid combination.
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.type: AcceleratorTypeOptional. Type of this accelerator.
core_count: i64Optional. Count of cores of this accelerator.
Implementations§
Source§impl AcceleratorConfig
impl AcceleratorConfig
pub fn new() -> Self
Sourcepub fn set_type<T: Into<AcceleratorType>>(self, v: T) -> Self
pub fn set_type<T: Into<AcceleratorType>>(self, v: T) -> Self
Sets the value of r#type.
§Example
ⓘ
use google_cloud_notebooks_v2::model::accelerator_config::AcceleratorType;
let x0 = AcceleratorConfig::new().set_type(AcceleratorType::NvidiaTeslaP100);
let x1 = AcceleratorConfig::new().set_type(AcceleratorType::NvidiaTeslaV100);
let x2 = AcceleratorConfig::new().set_type(AcceleratorType::NvidiaTeslaP4);Sourcepub fn set_core_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_core_count<T: Into<i64>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for AcceleratorConfig
impl Clone for AcceleratorConfig
Source§fn clone(&self) -> AcceleratorConfig
fn clone(&self) -> AcceleratorConfig
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 AcceleratorConfig
impl Debug for AcceleratorConfig
Source§impl Default for AcceleratorConfig
impl Default for AcceleratorConfig
Source§fn default() -> AcceleratorConfig
fn default() -> AcceleratorConfig
Returns the “default value” for a type. Read more
Source§impl Message for AcceleratorConfig
impl Message for AcceleratorConfig
Source§impl PartialEq for AcceleratorConfig
impl PartialEq for AcceleratorConfig
impl StructuralPartialEq for AcceleratorConfig
Auto Trait Implementations§
impl Freeze for AcceleratorConfig
impl RefUnwindSafe for AcceleratorConfig
impl Send for AcceleratorConfig
impl Sync for AcceleratorConfig
impl Unpin for AcceleratorConfig
impl UnwindSafe for AcceleratorConfig
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