#[non_exhaustive]pub struct LabelDescriptor {
    pub key: String,
    pub value_type: ValueType,
    pub description: String,
}Expand description
A description of a label.
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: StringThe label key.
value_type: ValueTypeThe type of data that can be assigned to the label.
description: StringA human-readable description for the label.
Implementations§
Source§impl LabelDescriptor
 
impl LabelDescriptor
Sourcepub fn set_value_type<T: Into<ValueType>>(self, v: T) -> Self
 
pub fn set_value_type<T: Into<ValueType>>(self, v: T) -> Self
Sets the value of value_type.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
 
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Trait Implementations§
Source§impl Clone for LabelDescriptor
 
impl Clone for LabelDescriptor
Source§fn clone(&self) -> LabelDescriptor
 
fn clone(&self) -> LabelDescriptor
Returns a copy 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 LabelDescriptor
 
impl Debug for LabelDescriptor
Source§impl Default for LabelDescriptor
 
impl Default for LabelDescriptor
Source§fn default() -> LabelDescriptor
 
fn default() -> LabelDescriptor
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LabelDescriptorwhere
    LabelDescriptor: Default,
 
impl<'de> Deserialize<'de> for LabelDescriptorwhere
    LabelDescriptor: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for LabelDescriptor
 
impl Message for LabelDescriptor
Source§impl PartialEq for LabelDescriptor
 
impl PartialEq for LabelDescriptor
Source§impl Serialize for LabelDescriptor
 
impl Serialize for LabelDescriptor
impl StructuralPartialEq for LabelDescriptor
Auto Trait Implementations§
impl Freeze for LabelDescriptor
impl RefUnwindSafe for LabelDescriptor
impl Send for LabelDescriptor
impl Sync for LabelDescriptor
impl Unpin for LabelDescriptor
impl UnwindSafe for LabelDescriptor
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