pub struct Attribute { /* private fields */ }Expand description
A flattened label entry, field name and value pair.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn from_json_value(
field_name: &str,
json_value: &Value,
) -> Result<Self, JsonConversionError>
pub fn from_json_value( field_name: &str, json_value: &Value, ) -> Result<Self, JsonConversionError>
Create a label from a flattened field name and a JSON value.
Objects and arrays are rejected because input is expected to be flattened. Numbers prefer integer first then real.
Sourcepub fn field_name(&self) -> &String
pub fn field_name(&self) -> &String
Field name getter.
Sourcepub fn value(&self) -> &AttributeValue
pub fn value(&self) -> &AttributeValue
Value getter.
Sourcepub fn from_value(
flattened_field_name: impl Into<String>,
value: AttributeValue,
) -> Self
pub fn from_value( flattened_field_name: impl Into<String>, value: AttributeValue, ) -> Self
Builder from explicit parts.
Trait Implementations§
impl Eq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.