Skip to content

Commit 2c16ebc

Browse files
committed
Add impl EncodeGaugeValue for u64
1 parent 872dbf6 commit 2c16ebc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/encoding/proto.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ impl EncodeGaugeValue for i64 {
272272
}
273273
}
274274

275+
impl EncodeGaugeValue for u64 {
276+
fn encode(&self) -> openmetrics_data_model::gauge_value::Value {
277+
openmetrics_data_model::gauge_value::Value::IntValue(*self as i64)
278+
}
279+
}
280+
275281
impl EncodeGaugeValue for f64 {
276282
fn encode(&self) -> openmetrics_data_model::gauge_value::Value {
277283
openmetrics_data_model::gauge_value::Value::DoubleValue(*self)

0 commit comments

Comments
 (0)