#[non_exhaustive]pub struct AcceleratorConfig {
pub accelerator_type_uri: String,
pub accelerator_count: i32,
/* private fields */
}Expand description
Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine.
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.accelerator_type_uri: StringFull URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes.
Examples:
<https://www.googleapis.com/compute/v1/projects/>[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-t4nvidia-tesla-t4
Auto Zone Exception: If you are using the Dataproc
Auto Zone
Placement
feature, you must use the short name of the accelerator type
resource, for example, nvidia-tesla-t4.
accelerator_count: i32The number of the accelerator cards of this type exposed to this instance.
Implementations§
Source§impl AcceleratorConfig
impl AcceleratorConfig
pub fn new() -> Self
Sourcepub fn set_accelerator_type_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_accelerator_type_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of accelerator_type_uri.
Sourcepub fn set_accelerator_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_accelerator_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of accelerator_count.
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