#[non_exhaustive]pub struct KeyValueObject {
pub name: Option<String>,
pub value: Option<String>,
pub values: Option<Vec<String>>,
}Expand description
Key:Value object
A generic object allowing to define a {key:value} pair.
[] Category: | Name: key_value_object
Constraints:
- at_least_one:
[value,values]
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.name: Option<String>Name
The name of the key.
required
value: Option<String>Value
The value associated to the key.
recommended
values: Option<Vec<String>>Values
Optional, the values associated to the key. You can populate this attribute, when you have multiple values for the same key.
recommended
Trait Implementations§
Source§impl Clone for KeyValueObject
impl Clone for KeyValueObject
Source§fn clone(&self) -> KeyValueObject
fn clone(&self) -> KeyValueObject
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 KeyValueObject
impl Debug for KeyValueObject
Source§impl Default for KeyValueObject
impl Default for KeyValueObject
Source§fn default() -> KeyValueObject
fn default() -> KeyValueObject
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KeyValueObjectwhere
KeyValueObject: Default,
impl<'de> Deserialize<'de> for KeyValueObjectwhere
KeyValueObject: 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 PartialEq for KeyValueObject
impl PartialEq for KeyValueObject
Source§impl Serialize for KeyValueObject
impl Serialize for KeyValueObject
impl StructuralPartialEq for KeyValueObject
Auto Trait Implementations§
impl Freeze for KeyValueObject
impl RefUnwindSafe for KeyValueObject
impl Send for KeyValueObject
impl Sync for KeyValueObject
impl Unpin for KeyValueObject
impl UnwindSafe for KeyValueObject
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