Enum resp::Value
[−]
[src]
pub enum Value { Null, NullArray, String(String), Error(String), Integer(i64), Bulk(String), BufBulk(Vec<u8>), Array(Vec<Value>), }
Represents a RESP value http://redis.io/topics/protocol
Variants
Null
Null bulk reply, $-1\r\n
NullArray
Null array reply, *-1\r\n
String(String)
For Simple Strings the first byte of the reply is "+"[43]
Error(String)
For Errors the first byte of the reply is "-"[45]
Integer(i64)
For Integers the first byte of the reply is ":"[58]
Bulk(String)
For Bulk Strings the first byte of the reply is "$"[36]
BufBulk(Vec<u8>)
For Bulk
Array(Vec<Value>)
For Arrays the first byte of the reply is "*"[42]
Methods
impl Value
[src]
fn is_null(&self) -> bool
Returns true if the Value
is a Null. Returns false otherwise.
fn is_error(&self) -> bool
Returns true if the Value
is a Error. Returns false otherwise.
fn encode(&self) -> Vec<u8>
fn to_encoded_string(&self) -> Result<String>
fn to_beautify_string(&self) -> String
Trait Implementations
impl Debug for Value
[src]
impl PartialEq for Value
[src]
fn eq(&self, __arg_0: &Value) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Value) -> bool
This method tests for !=
.
impl Eq for Value
[src]
impl Clone for Value
[src]
fn clone(&self) -> Value
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more