#[non_exhaustive]pub struct Attributes {
pub attribute_map: HashMap<String, AttributeValue>,
pub dropped_attributes_count: i32,
/* private fields */
}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
pub fn new() -> Self
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.
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.
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
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 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 PartialEq for Attributes
impl PartialEq 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