#[non_exhaustive]pub struct LabelDescriptor {
pub key: String,
pub value_type: ValueType,
pub description: String,
/* private fields */
}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
pub fn new() -> Self
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.
§Example
ⓘ
use google_cloud_api::model::label_descriptor::ValueType;
let x0 = LabelDescriptor::new().set_value_type(ValueType::Bool);
let x1 = LabelDescriptor::new().set_value_type(ValueType::Int64);Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for LabelDescriptor
impl Clone for LabelDescriptor
Source§fn clone(&self) -> LabelDescriptor
fn clone(&self) -> LabelDescriptor
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 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 Message for LabelDescriptor
impl Message for LabelDescriptor
Source§impl PartialEq for LabelDescriptor
impl PartialEq 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