#[repr(C)]pub struct Label {
pub key: Record<StringOffset, 1, OPT_ZERO>,
pub str: Record<StringOffset, 2, OPT_ZERO>,
pub num: Record<i64, 3, OPT_ZERO>,
pub num_unit: Record<StringOffset, 4, OPT_ZERO>,
}Expand description
A label includes additional context for this sample. It can include things like a thread id, allocation size, etc.
Fields§
§key: Record<StringOffset, 1, OPT_ZERO>An annotation for a sample, e.g. “allocation_size”.
str: Record<StringOffset, 2, OPT_ZERO>At most, one of the str and num should be used.
num: Record<i64, 3, OPT_ZERO>At most, one of the str and num should be used.
num_unit: Record<StringOffset, 4, OPT_ZERO>Should only be present when num is present. Specifies the units of num. Use arbitrary string (for example, “requests”) as a custom count unit. If no unit is specified, consumer may apply heuristic to deduce it.
Trait Implementations§
Source§impl Value for Label
§Safety
The Default implementation will return all zero-representations.
impl Value for Label
§Safety
The Default implementation will return all zero-representations.
impl Copy for Label
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl Freeze for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnsafeUnpin for Label
impl UnwindSafe for Label
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