#[repr(u8)]pub enum DataTypeToken {
BulkString = 36,
Array = 42,
SimpleString = 43,
Error = 45,
Integer = 58,
Unknown = 59,
}Expand description
RESP signals data types by prepending these one-character tokens
Variants§
BulkString = 36
A single binary-safe string up to 512 MB in length. Precedes a CRLF-terminated length describing the following string. Can also be used to signal non-existence of a value using a special format that is used to represent a null value i.e. “$-1\r\n”. Note the ‘empty’ string still CRLF-terminates unlike the null value i.e. “$0\r\n\r\n”.
Array = 42
Clients send commands to the Redis server using RESP arrays. Servers can also return collections of elements with arrays. Precedes a CRLF-terminated length describing the following array. Empty type: “*0\r\n”. Note that single elements to the array may be null, in which case the element will look like the null value as described in BulkString
SimpleString = 43
Used to transmit non-binary-safe strings. These strings cannot contain ‘\r’ or ‘\n’ and are terminated by “\r\n”.
Error = 45
Exactly like simple strings but errors should be treated by the client as exceptions.
Integer = 58
Like simple strings, but representing an integer.
Unknown = 59
Implementations§
Trait Implementations§
Source§impl Clone for DataTypeToken
impl Clone for DataTypeToken
Source§fn clone(&self) -> DataTypeToken
fn clone(&self) -> DataTypeToken
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more