#[non_exhaustive]pub struct SchedulingNodeAffinity {
pub key: Option<String>,
pub operator: Option<Operator>,
pub values: Vec<String>,
/* private fields */
}Available on crate features
instance-templates or instances or machine-images or region-instance-templates or region-instances only.Expand description
Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
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.key: Option<String>Corresponds to the label key of Node resource.
operator: Option<Operator>Defines the operation of node selection. Valid operators areIN for affinity and NOT_IN for anti-affinity.
values: Vec<String>Corresponds to the label values of Node resource.
Implementations§
Source§impl SchedulingNodeAffinity
impl SchedulingNodeAffinity
pub fn new() -> Self
Sourcepub fn set_or_clear_key<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_key<T>(self, v: Option<T>) -> Self
Sets or clears the value of key.
Sourcepub fn set_operator<T>(self, v: T) -> Self
pub fn set_operator<T>(self, v: T) -> Self
Sets the value of operator.
Sourcepub fn set_or_clear_operator<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_operator<T>(self, v: Option<T>) -> Self
Sets or clears the value of operator.
Sourcepub fn set_values<T, V>(self, v: T) -> Self
pub fn set_values<T, V>(self, v: T) -> Self
Sets the value of values.
Trait Implementations§
Source§impl Clone for SchedulingNodeAffinity
impl Clone for SchedulingNodeAffinity
Source§fn clone(&self) -> SchedulingNodeAffinity
fn clone(&self) -> SchedulingNodeAffinity
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 SchedulingNodeAffinity
impl Debug for SchedulingNodeAffinity
Source§impl Default for SchedulingNodeAffinity
impl Default for SchedulingNodeAffinity
Source§fn default() -> SchedulingNodeAffinity
fn default() -> SchedulingNodeAffinity
Returns the “default value” for a type. Read more
Source§impl Message for SchedulingNodeAffinity
impl Message for SchedulingNodeAffinity
Source§impl PartialEq for SchedulingNodeAffinity
impl PartialEq for SchedulingNodeAffinity
impl StructuralPartialEq for SchedulingNodeAffinity
Auto Trait Implementations§
impl Freeze for SchedulingNodeAffinity
impl RefUnwindSafe for SchedulingNodeAffinity
impl Send for SchedulingNodeAffinity
impl Sync for SchedulingNodeAffinity
impl Unpin for SchedulingNodeAffinity
impl UnwindSafe for SchedulingNodeAffinity
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