scale_value

Module stringify

source
Expand description

Converting a crate::Value to or from strings.

Modules§

Structs§

  • A struct which will try to parse a string into a Value. This can be configured with custom parsers to extend what we’re able to parse into a Value.
  • An error parsing the provided string into a Value
  • A struct which will try to format a Value and write the output to a writer. This can be configured with custom parsers to extend how to write out the value.

Enums§

Functions§

  • Attempt to parse a string into a [crate::Value<()>], returning a tuple consisting of a result (either the value or a ParseError containing location and error information) and the remainder of the string that wasn’t parsed.
  • This is similar to from_str, except that it returns a FromStrBuilder, which allows for some additional configuration in how strings are parsed.
  • Identical to calling to_string() on the crate::Value, but here just to make it a little more obvious that this is the inverse of from_str.
  • Format a crate::Value to a string, writing it to the provided writer.
  • Format a crate::Value to a string. Several options can be configured in the process, such as the indentation, custom formatters, printing of context, and style (compact or spaced).