|
16 | 16 | //! will contain any fields attached to each event.
|
17 | 17 | //!
|
18 | 18 | //! `tracing` represents values as either one of a set of Rust primitives
|
19 |
| -//! (`i64`, `u64`, `f64`, `bool`, and `&str`) or using a `fmt::Display` or |
20 |
| -//! `fmt::Debug` implementation. Collectors are provided these primitive |
21 |
| -//! value types as `dyn Value` trait objects. |
| 19 | +//! (`i64`, `u64`, `f64`, `i128`, `u128`, `bool`, and `&str`) or using a |
| 20 | +//! `fmt::Display` or `fmt::Debug` implementation. Collectors are provided |
| 21 | +//! these primitive value types as `dyn Value` trait objects. |
22 | 22 | //!
|
23 | 23 | //! These trait objects can be formatted using `fmt::Debug`, but may also be
|
24 | 24 | //! recorded as typed data by calling the [`Value::record`] method on these
|
@@ -194,6 +194,16 @@ pub trait Visit {
|
194 | 194 | self.record_debug(field, &value)
|
195 | 195 | }
|
196 | 196 |
|
| 197 | + /// Visit a signed 128-bit integer value. |
| 198 | + fn record_i128(&mut self, field: &Field, value: i128) { |
| 199 | + self.record_debug(field, &value) |
| 200 | + } |
| 201 | + |
| 202 | + /// Visit an unsigned 128-bit integer value. |
| 203 | + fn record_u128(&mut self, field: &Field, value: u128) { |
| 204 | + self.record_debug(field, &value) |
| 205 | + } |
| 206 | + |
197 | 207 | /// Visit a boolean value.
|
198 | 208 | fn record_bool(&mut self, field: &Field, value: bool) {
|
199 | 209 | self.record_debug(field, &value)
|
@@ -393,6 +403,8 @@ impl_values! {
|
393 | 403 | record_u64(usize, u32, u16, u8 as u64),
|
394 | 404 | record_i64(i64),
|
395 | 405 | record_i64(isize, i32, i16, i8 as i64),
|
| 406 | + record_u128(u128), |
| 407 | + record_i128(i128), |
396 | 408 | record_bool(bool),
|
397 | 409 | record_f64(f64, f32 as f64)
|
398 | 410 | }
|
|
0 commit comments