pub struct AutoExportingMetricsBuilder<Message: MetricMessage> { /* private fields */ }
Expand description
A builder to help configure a metrics counter that exports regularly to redis
This struct also acts as the internal config object for the counter once built.
Implementations§
Source§impl<Message: MetricMessage> AutoExportingMetricsBuilder<Message>
impl<Message: MetricMessage> AutoExportingMetricsBuilder<Message>
Sourcepub fn counter_name(self, value: String) -> Self
pub fn counter_name(self, value: String) -> Self
Set the name field for this counter
Sourcepub fn export_interval(self, value: Duration) -> Self
pub fn export_interval(self, value: Duration) -> Self
Set the export interval
Sourcepub fn export_zero(self, value: bool) -> Self
pub fn export_zero(self, value: bool) -> Self
Configure if messages should be sent when no content has been added
Sourcepub fn start(self) -> AutoExportingMetrics<Message>
pub fn start(self) -> AutoExportingMetrics<Message>
Launch the auto exporting process and return a handle for incrementing metrics
Auto Trait Implementations§
impl<Message> !Freeze for AutoExportingMetricsBuilder<Message>
impl<Message> !RefUnwindSafe for AutoExportingMetricsBuilder<Message>
impl<Message> Send for AutoExportingMetricsBuilder<Message>
impl<Message> Sync for AutoExportingMetricsBuilder<Message>
impl<Message> Unpin for AutoExportingMetricsBuilder<Message>where
Message: Unpin,
impl<Message> !UnwindSafe for AutoExportingMetricsBuilder<Message>
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