#[non_exhaustive]pub struct Attributes {
pub attribute_map: HashMap<String, AttributeValue>,
pub dropped_attributes_count: i32,
}Expand description
A set of attributes as key-value pairs.
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.attribute_map: HashMap<String, AttributeValue>A set of attributes. Each attribute’s key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the boolean values true or false. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"abc.com/myattribute": { "bool_value": false }dropped_attributes_count: i32The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all attributes are valid.
Implementations§
Source§impl Attributes
impl Attributes
Sourcepub fn set_dropped_attributes_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_dropped_attributes_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of dropped_attributes_count.
Sourcepub fn set_attribute_map<T, K, V>(self, v: T) -> Self
pub fn set_attribute_map<T, K, V>(self, v: T) -> Self
Sets the value of attribute_map.
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
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 Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
Source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Attributeswhere
Attributes: Default,
impl<'de> Deserialize<'de> for Attributeswhere
Attributes: 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 Attributes
impl PartialEq for Attributes
Source§impl Serialize for Attributes
impl Serialize for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
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