pub enum RespValue {
SimpleString(String),
Error(String),
Integer(i64),
BulkString(Vec<u8>),
Array(Vec<RespValue>),
Map(BTreeMap<String, RespValue>),
Null,
}Expand description
A value in the RESP3 protocol.
Variants§
SimpleString(String)
+OK\r\n
Error(String)
-ERR message\r\n
Integer(i64)
:<number>\r\n
BulkString(Vec<u8>)
$<len>\r\n<data>\r\n or $-1\r\n for null
Array(Vec<RespValue>)
*<count>\r\n...
Map(BTreeMap<String, RespValue>)
%<count>\r\n... (RESP3 map type)
Null
_\r\n (RESP3 null)
Implementations§
Trait Implementations§
impl StructuralPartialEq for RespValue
Auto Trait Implementations§
impl Freeze for RespValue
impl RefUnwindSafe for RespValue
impl Send for RespValue
impl Sync for RespValue
impl Unpin for RespValue
impl UnsafeUnpin for RespValue
impl UnwindSafe for RespValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more