Skip to main content

Module value

Module value 

Source
Expand description

SafLogValue trait for formatting Rust values into the SAF log DSL.

Each type maps to a DSL value type:

  • IDs (EntityId impls) → 0x + hex
  • Sets (BTreeSet<T>) → {a,b,c}
  • Lists (Vec<T>, &[T]) → [a,b,c]
  • Pairs (SafPair<T>) → a->b
  • Ratios (SafRatio) → n/m
  • Deltas (PtsDelta<T>) → +{a,b} or -{a,b}
  • Primitives → bare values

Macros§

impl_saf_log_int 🔒

Structs§

SafPair
A directed pair rendered as a->b.
SafRatio
A ratio rendered as n/m.

Enums§

PtsDelta
A set delta rendered as +{a,b} (added) or -{a,b} (removed).

Traits§

SafLogValue
Trait for formatting values into the SAF log DSL output.