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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more