Expand description
Value formatting implementation
This module provides basic/fallback formatting for wire values.
Important: Complex format implementations (Percent, Currency, Scientific, etc.) are now defined in Shape stdlib (stdlib/core/formats.shape) and executed via the Shape runtime. This Rust code provides only:
- Basic “Default” format for each type (simple display)
- Fallback for when Shape runtime is not available
- Wire protocol serialization helpers
For rich formatting with custom parameters, use Shape’s .format() method:
let value = 0.1234;
value.format("Percent") // "12.34%"
value.format({ format: "Percent", decimals: 1 }) // "12.3%"Functions§
- format_
value - Format a wire value to a string using the specified format
- parse_
value - Parse a string into a wire value (basic fallback)