Enum ntex_redis::codec::Request [−][src]
pub enum Request {
Array(Vec<Request>),
BulkString(BulkString),
BulkStatic(&'static [u8]),
BulkInteger(i64),
String(ByteString),
Integer(i64),
}
Expand description
A single RESP value, this owns the data that is to-be written to Redis.
It is cloneable to allow multiple copies to be delivered in certain circumstances, e.g. multiple subscribers to the same topic.
Variants
Array(Vec<Request>)
Zero, one or more other Reqeests
s.
BulkString(BulkString)
Tuple Fields
0: BulkString
A bulk string. In Redis terminology a string is a byte-array, so this is stored as a
vector of u8
s to allow clients to interpret the bytes as appropriate.
BulkStatic(&'static [u8])
Tuple Fields
A bulk string. In Redis terminology a string is a byte-array, so this is stored as a
vector of u8
s to allow clients to interpret the bytes as appropriate.
BulkInteger(i64)
Tuple Fields
0: i64
Convert integer to string representation.
String(ByteString)
Tuple Fields
0: ByteString
A valid utf-8 string
Integer(i64)
Tuple Fields
0: i64
Redis documentation defines an integer as being a signed 64-bit integer: https://redis.io/topics/protocol#resp-integers
Implementations
Create request from static str
Create request from static str
Convenience function for building dynamic Redis commands with variable numbers of arguments, e.g. RPUSH
Self get converted to array if it is not an array.
Convenience function for building dynamic Redis commands with variable numbers of arguments, e.g. RPUSH
Self get converted to array if it is not an array.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Request
impl !UnwindSafe for Request
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more