#[non_exhaustive]pub struct GlobalVmExtensionPolicyLabelSelector {
pub inclusion_labels: HashMap<String, String>,
/* private fields */
}Available on crate feature
global-vm-extension-policies only.Expand description
A LabelSelector is applicable for a VM only if it matches all labels in the LabelSelector.
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.inclusion_labels: HashMap<String, String>Optional. Labels as key value pairs. A VM should contain all the pairs specified in this map to be selected; Labels within the LabelSelector are OR’ed.
Implementations§
Source§impl GlobalVmExtensionPolicyLabelSelector
impl GlobalVmExtensionPolicyLabelSelector
Sourcepub fn set_inclusion_labels<T, K, V>(self, v: T) -> Self
pub fn set_inclusion_labels<T, K, V>(self, v: T) -> Self
Sets the value of inclusion_labels.
§Example
ⓘ
let x = GlobalVmExtensionPolicyLabelSelector::new().set_inclusion_labels([
("key0", "abc"),
("key1", "xyz"),
]);Trait Implementations§
Source§impl Clone for GlobalVmExtensionPolicyLabelSelector
impl Clone for GlobalVmExtensionPolicyLabelSelector
Source§fn clone(&self) -> GlobalVmExtensionPolicyLabelSelector
fn clone(&self) -> GlobalVmExtensionPolicyLabelSelector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for GlobalVmExtensionPolicyLabelSelector
impl Default for GlobalVmExtensionPolicyLabelSelector
Source§fn default() -> GlobalVmExtensionPolicyLabelSelector
fn default() -> GlobalVmExtensionPolicyLabelSelector
Returns the “default value” for a type. Read more
Source§impl PartialEq for GlobalVmExtensionPolicyLabelSelector
impl PartialEq for GlobalVmExtensionPolicyLabelSelector
Source§fn eq(&self, other: &GlobalVmExtensionPolicyLabelSelector) -> bool
fn eq(&self, other: &GlobalVmExtensionPolicyLabelSelector) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GlobalVmExtensionPolicyLabelSelector
Auto Trait Implementations§
impl Freeze for GlobalVmExtensionPolicyLabelSelector
impl RefUnwindSafe for GlobalVmExtensionPolicyLabelSelector
impl Send for GlobalVmExtensionPolicyLabelSelector
impl Sync for GlobalVmExtensionPolicyLabelSelector
impl Unpin for GlobalVmExtensionPolicyLabelSelector
impl UnsafeUnpin for GlobalVmExtensionPolicyLabelSelector
impl UnwindSafe for GlobalVmExtensionPolicyLabelSelector
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