Struct k8s_openapi_ext::metav1::LabelSelector
source · [−]pub struct LabelSelector {
pub match_expressions: Option<Vec<LabelSelectorRequirement, Global>>,
pub match_labels: Option<BTreeMap<String, String, Global>>,
}
Expand description
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
Fields
match_expressions: Option<Vec<LabelSelectorRequirement, Global>>
matchExpressions is a list of label selector requirements. The requirements are ANDed.
match_labels: Option<BTreeMap<String, String, Global>>
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
Trait Implementations
sourceimpl Clone for LabelSelector
impl Clone for LabelSelector
sourcefn clone(&self) -> LabelSelector
fn clone(&self) -> LabelSelector
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LabelSelector
impl Debug for LabelSelector
sourceimpl DeepMerge for LabelSelector
impl DeepMerge for LabelSelector
sourcefn merge_from(&mut self, other: LabelSelector)
fn merge_from(&mut self, other: LabelSelector)
Merge
other
into self
.sourceimpl Default for LabelSelector
impl Default for LabelSelector
sourcefn default() -> LabelSelector
fn default() -> LabelSelector
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for LabelSelector
impl<'de> Deserialize<'de> for LabelSelector
sourcefn deserialize<D>(
deserializer: D
) -> Result<LabelSelector, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<LabelSelector, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl LabelSelectorExt for LabelSelector
impl LabelSelectorExt for LabelSelector
fn new() -> Self
fn all_objects() -> Self
fn no_objects() -> Self
fn match_labels(
self,
match_labels: impl IntoIterator<Item = (impl ToString, impl ToString)>
) -> Self
sourceimpl PartialEq<LabelSelector> for LabelSelector
impl PartialEq<LabelSelector> for LabelSelector
sourcefn eq(&self, other: &LabelSelector) -> bool
fn eq(&self, other: &LabelSelector) -> bool
sourceimpl Serialize for LabelSelector
impl Serialize for LabelSelector
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LabelSelector
Auto Trait Implementations
impl RefUnwindSafe for LabelSelector
impl Send for LabelSelector
impl Sync for LabelSelector
impl Unpin for LabelSelector
impl UnwindSafe for LabelSelector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more