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>)

Tuple Fields

Zero, one or more other Reqeestss.

BulkString(BulkString)

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.

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: i64

Convert integer to string representation.

String(ByteString)

Tuple Fields

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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