pub struct CollectorSchema {
pub kind: MetricKind,
pub name: String,
pub help: &'static str,
pub labels: &'static [&'static str],
pub buckets: &'static [f64],
}Expand description
The wire schema of one collector: what a scrape exposes.
Fields§
§kind: MetricKindThe event kind the collector receives.
name: StringThe fully qualified metric name, prefix included.
help: &'static strThe Prometheus help text, spelled as in the TypeScript adapter.
labels: &'static [&'static str]Label names in wire order.
buckets: &'static [f64]Histogram bucket upper bounds; empty for counters.
Implementations§
Source§impl CollectorSchema
impl CollectorSchema
Sourcepub fn is_counter(&self) -> bool
pub fn is_counter(&self) -> bool
true for the counter vectors; every other collector is a histogram.
Trait Implementations§
Source§impl Clone for CollectorSchema
impl Clone for CollectorSchema
Source§fn clone(&self) -> CollectorSchema
fn clone(&self) -> CollectorSchema
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 CollectorSchema
impl Debug for CollectorSchema
Source§impl PartialEq for CollectorSchema
impl PartialEq for CollectorSchema
Source§fn eq(&self, other: &CollectorSchema) -> bool
fn eq(&self, other: &CollectorSchema) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CollectorSchema
Auto Trait Implementations§
impl Freeze for CollectorSchema
impl RefUnwindSafe for CollectorSchema
impl Send for CollectorSchema
impl Sync for CollectorSchema
impl Unpin for CollectorSchema
impl UnsafeUnpin for CollectorSchema
impl UnwindSafe for CollectorSchema
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