Struct lib_resp::Parser
[−]
[src]
pub struct Parser;
Core parser implementation.
Methods
impl Parser
[src]
pub fn parse(data: &[u8]) -> Result<(&[u8], Value), Err<&[u8]>>
[src]
Parses RESP from a byte buffer.
pub fn parse_str(resp: &str) -> Result<Option<Value>, ()>
[src]
Parses a RESP encoded string.
Examples
let age = Parser::parse_str(":-3").unwrap(); println!("{:?}", age);