Skip to main content

parse_value

Function parse_value 

Source
pub fn parse_value(raw: &str) -> Value
Expand description

Parse a raw string into the most specific Value variant it matches: bool, then i32, then f64, falling back to String.

Moved here from opcda-bridge-client’s commands.rs unchanged: this coercion was never CLI-specific, and any async Rust consumer of crate::Client::write (not only the CLI’s write subcommand) needs the identical bool/int/float/string inference to turn a plain string into a typed Value.