You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RELEASES.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,13 @@
210
210
***`#![forbid(unsafe_code)]` enforced**
211
211
- The crate contains zero `unsafe` blocks; this is now enforced at the crate level
212
212
213
+
***Cross-variant numeric extraction on `DataNumber` and `FieldValue`**
214
+
-`DataNumber::as_u8()`, `as_u16()`, `as_u64()` — try to extract a value from any numeric variant, narrowing or widening as needed (returns `None` if the value doesn't fit)
215
+
-`FieldValue::as_u8()` — delegates to `DataNumber` and also converts `ProtocolType` to its numeric value
216
+
-`FieldValue::as_u16()` — delegates to `DataNumber`
217
+
-`FieldValue::as_u64()` — delegates to `DataNumber` and converts `Duration` variants to milliseconds
218
+
- Unlike the existing `TryFrom` impls (which only match the exact variant), these methods work across all numeric widths
219
+
213
220
***Expanded root re-exports**
214
221
-`Config`, `ConfigError`, `TtlConfig`, `EnterpriseFieldRegistry`, `CacheMetrics`, `NoTemplateInfo`, `DEFAULT_MAX_RECORDS_PER_FLOWSET`, `DEFAULT_MAX_SOURCES` — now available at crate root
215
222
-`DataNumber`, `FieldDataType`, `FieldValue` — commonly used field/data types at crate root
@@ -382,6 +389,8 @@
382
389
- Split `v9.rs` into `v9/{mod.rs, parser.rs, serializer.rs}`
383
390
- Split `ipfix.rs` into `ipfix/{mod.rs, parser.rs, serializer.rs}`
0 commit comments