pub struct Encoder<'a, 'b> { /* private fields */ }
Expand description
Helper type for EncodeMetric
, see EncodeMetric::encode
.
Implementations
sourceimpl<'a, 'b> Encoder<'a, 'b>
impl<'a, 'b> Encoder<'a, 'b>
sourcepub fn encode_suffix(
&mut self,
suffix: &'static str
) -> Result<BucketEncoder<'_>, Error>
pub fn encode_suffix(
&mut self,
suffix: &'static str
) -> Result<BucketEncoder<'_>, Error>
Encode a metric suffix, e.g. in the case of Counter
the suffic _total
.
sourcepub fn no_suffix(&mut self) -> Result<BucketEncoder<'_>, Error>
pub fn no_suffix(&mut self) -> Result<BucketEncoder<'_>, Error>
Signal that the metric has no suffix.
sourcepub fn with_label_set<'c, 'd>(
&'c mut self,
label_set: &'d dyn Encode
) -> Encoder<'c, 'd>
pub fn with_label_set<'c, 'd>(
&'c mut self,
label_set: &'d dyn Encode
) -> Encoder<'c, 'd>
Encode a set of labels. Used by wrapper metric types like Family
.
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for Encoder<'a, 'b>
impl<'a, 'b> !Send for Encoder<'a, 'b>
impl<'a, 'b> !Sync for Encoder<'a, 'b>
impl<'a, 'b> Unpin for Encoder<'a, 'b>
impl<'a, 'b> !UnwindSafe for Encoder<'a, 'b>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more