pub struct PropertySet {
pub entries: Vec<(String, PropertyValue)>,
}Expand description
A set of named properties attached to a metric. Order is preserved (it is significant on the wire, where keys and values are parallel arrays).
Fields§
§entries: Vec<(String, PropertyValue)>The (key, value) entries, in wire order.
Implementations§
Source§impl PropertySet
impl PropertySet
Sourcepub fn with(self, key: impl Into<String>, value: PropertyValue) -> Self
pub fn with(self, key: impl Into<String>, value: PropertyValue) -> Self
Append a property, returning self for chaining.
Sourcepub fn get(&self, key: &str) -> Option<&PropertyValue>
pub fn get(&self, key: &str) -> Option<&PropertyValue>
Look up a property value by key (first match).
Trait Implementations§
Source§impl Clone for PropertySet
impl Clone for PropertySet
Source§fn clone(&self) -> PropertySet
fn clone(&self) -> PropertySet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PropertySet
impl Debug for PropertySet
Source§impl Default for PropertySet
impl Default for PropertySet
Source§fn default() -> PropertySet
fn default() -> PropertySet
Returns the “default value” for a type. Read more
Source§impl PartialEq for PropertySet
impl PartialEq for PropertySet
Source§fn eq(&self, other: &PropertySet) -> bool
fn eq(&self, other: &PropertySet) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PropertySet
Auto Trait Implementations§
impl Freeze for PropertySet
impl RefUnwindSafe for PropertySet
impl Send for PropertySet
impl Sync for PropertySet
impl Unpin for PropertySet
impl UnsafeUnpin for PropertySet
impl UnwindSafe for PropertySet
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