pub struct MetricsCollection {
pub metrics: Vec<Arc<dyn Metrics>>,
}
Fields§
§metrics: Vec<Arc<dyn Metrics>>
Implementations§
Source§impl MetricsCollection
impl MetricsCollection
pub fn new(metrics: Vec<Arc<dyn Metrics>>) -> Self
pub async fn initialize_metrics(&self) -> CarbonResult<()>
pub async fn shutdown_metrics(&self) -> CarbonResult<()>
pub async fn flush_metrics(&self) -> CarbonResult<()>
pub async fn update_gauge(&self, name: &str, value: f64) -> CarbonResult<()>
pub async fn increment_counter( &self, name: &str, value: u64, ) -> CarbonResult<()>
pub async fn record_histogram(&self, name: &str, value: f64) -> CarbonResult<()>
Trait Implementations§
Source§impl Default for MetricsCollection
impl Default for MetricsCollection
Source§fn default() -> MetricsCollection
fn default() -> MetricsCollection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetricsCollection
impl !RefUnwindSafe for MetricsCollection
impl Send for MetricsCollection
impl Sync for MetricsCollection
impl Unpin for MetricsCollection
impl !UnwindSafe for MetricsCollection
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more