From 818e915d2b20b56afe77372f3510943d6a2d7a48 Mon Sep 17 00:00:00 2001 From: rcrwhyg Date: Mon, 2 Sep 2024 18:20:16 +0800 Subject: [PATCH] temp commit --- src/lib.rs | 3 +++ src/resp/mod.rs | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/lib.rs create mode 100644 src/resp/mod.rs 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;