Enum ntex_redis::codec::Response [−][src]
pub enum Response {
Nil,
Array(Vec<Response>),
Bytes(Bytes),
String(ByteString),
Error(ByteString),
Integer(i64),
}Expand description
A single RESP value, this owns the data that is read from Redis.
Variants
Zero, one or more other Responses.
Bytes(Bytes)A bulk string. In Redis terminology a string is a byte-array, so this is stored as a
vector of u8s to allow clients to interpret the bytes as appropriate.
Tuple Fields of Bytes
0: BytesString(ByteString)A valid utf-8 string
Tuple Fields of String
0: ByteStringError(ByteString)An error from the Redis server
Tuple Fields of Error
0: ByteStringInteger(i64)Redis documentation defines an integer as being a signed 64-bit integer: https://redis.io/topics/protocol#resp-integers
Tuple Fields of Integer
0: i64Implementations
Extract redis server error to Result
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
impl UnwindSafe for Response
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self