parse_hex

Function parse_hex 

Source
pub fn parse_hex(s: &mut &str) -> Option<Result<Value<()>, ParseError>>
Expand description

Attempt to parse a hex string into a Value<()> (or more specifically, an unnamed composite).

  • Returns an error if we see a leading 0x and then see invalid hex characters after this.
  • Returns None if no 0x is seen first.
  • Returns Some(value) if parsing was successful. In this case, the string reference given is wound forwards to consume what was parsed.