diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..62bcc21 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,3 @@ +mod resp; + +pub use resp::*; diff --git a/src/resp/mod.rs b/src/resp/mod.rs new file mode 100644 index 0000000..c290509 --- /dev/null +++ b/src/resp/mod.rs @@ -0,0 +1,22 @@ +use std::collections::{HashMap, HashSet}; + +pub enum RespFrame { + SimpleString(SimpleString), + Error(SimpleError), + Integer(i64), + BulkString(Vec), + Array(Vec), + Null(RespNull), + NullArray(RespNullArray), + Boolean(bool), + Double(f64), + Map(HashMap), + Set(HashSet), +} + +#[allow(dead_code)] +pub struct SimpleString(String); +#[allow(dead_code)] +pub struct SimpleError(String); +pub struct RespNull; +pub struct RespNullArray;