Add accessor

This commit is contained in:
Dominik Werder
2025-04-08 17:54:28 +02:00
parent f192ca7fa4
commit 4bf41f288f
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "mettrics"
version = "0.0.4"
version = "0.0.5"
description = "Makes publishing meaningful metrics from applications easier."
authors = ["Dominik Werder <dominik.werder@gmail.com>"]
license = "GPL-3.0-only"
@@ -8,4 +8,4 @@ edition = "2024"
[dependencies]
serde = { version = "1", features = ["derive"] }
mettrics-macros = { version = "0.0.4", path = "../mettrics-macros" }
mettrics-macros = { version = "0.0.5", path = "../mettrics-macros" }

View File

@@ -25,4 +25,8 @@ impl CounterU32 {
pub fn ingest(&mut self, rhs: Self) {
self.v += rhs.v
}
pub fn to_u32(&self) -> u32 {
self.v
}
}