#[repr(i32)]pub enum Preemptibility {
Unspecified = 0,
NonPreemptible = 1,
Preemptible = 2,
Spot = 3,
}
Expand description
Controls the use of preemptible instances within the group.
Variants§
Unspecified = 0
Preemptibility is unspecified, the system will choose the appropriate setting for each instance group.
NonPreemptible = 1
Instances are non-preemptible.
This option is allowed for all instance groups and is the only valid value for Master and Worker instance groups.
Preemptible = 2
Instances are [preemptible] (https://cloud.google.com/compute/docs/instances/preemptible).
This option is allowed only for [secondary worker] (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms) groups.
Spot = 3
Instances are [Spot VMs] (https://cloud.google.com/compute/docs/instances/spot).
This option is allowed only for [secondary worker] (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms) groups. Spot VMs are the latest version of [preemptible VMs] (https://cloud.google.com/compute/docs/instances/preemptible), and provide additional features.
Implementations§
source§impl Preemptibility
impl Preemptibility
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for Preemptibility
impl Clone for Preemptibility
source§fn clone(&self) -> Preemptibility
fn clone(&self) -> Preemptibility
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Preemptibility
impl Debug for Preemptibility
source§impl Default for Preemptibility
impl Default for Preemptibility
source§fn default() -> Preemptibility
fn default() -> Preemptibility
source§impl From<Preemptibility> for i32
impl From<Preemptibility> for i32
source§fn from(value: Preemptibility) -> i32
fn from(value: Preemptibility) -> i32
source§impl Hash for Preemptibility
impl Hash for Preemptibility
source§impl Ord for Preemptibility
impl Ord for Preemptibility
source§fn cmp(&self, other: &Preemptibility) -> Ordering
fn cmp(&self, other: &Preemptibility) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for Preemptibility
impl PartialEq for Preemptibility
source§fn eq(&self, other: &Preemptibility) -> bool
fn eq(&self, other: &Preemptibility) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Preemptibility
impl PartialOrd for Preemptibility
source§fn partial_cmp(&self, other: &Preemptibility) -> Option<Ordering>
fn partial_cmp(&self, other: &Preemptibility) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for Preemptibility
impl TryFrom<i32> for Preemptibility
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<Preemptibility, UnknownEnumValue>
fn try_from(value: i32) -> Result<Preemptibility, UnknownEnumValue>
impl Copy for Preemptibility
impl Eq for Preemptibility
impl StructuralPartialEq for Preemptibility
Auto Trait Implementations§
impl Freeze for Preemptibility
impl RefUnwindSafe for Preemptibility
impl Send for Preemptibility
impl Sync for Preemptibility
impl Unpin for Preemptibility
impl UnwindSafe for Preemptibility
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request