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 Reqeestss.
BulkString(BulkString)
Tuple Fields
0: BulkStringA 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.
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 u8s to allow clients to interpret the bytes as appropriate.
BulkInteger(i64)
Tuple Fields
0: i64Convert integer to string representation.
String(ByteString)
Tuple Fields
0: ByteStringA valid utf-8 string
Integer(i64)
Tuple Fields
0: i64Redis 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
type Future = Either<CommandResult, Ready<Response, Error>>
type Future = Either<CommandResult, Ready<Response, Error>>
The future response value.
Returns Ready when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
fn poll_shutdown(&self, ctx: &mut Context<'_>, is_error: bool) -> Poll<()>
fn poll_shutdown(&self, ctx: &mut Context<'_>, is_error: bool) -> Poll<()>
Shutdown service. Read more
Map this service’s output to a different type, returning a new service of the resulting type. Read more
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
