redis_parser/
lib.rs

1/// Redis Protocol Parser
2///
3/// This crate provides a zero-copy parser for the RESP2 and RESP3 protocols.
4///
5/// # Examples
6/// ```
7/// use redis_parser::resp2::{parse as parse2, Resp2Type};
8/// use redis_parser::resp3::{parse as parse3, Resp3Type};
9///
10/// assert_eq!(parse2("+test\r\n".as_bytes()), Ok((&b""[..], Resp2Type::String("test"))));
11/// assert_eq!(parse3("#f\r\n".as_bytes()), Ok((&b""[..], Resp3Type::Boolean(false))));
12/// ```
13pub mod resp2;
14pub mod resp3;
15mod utils;