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)

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

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)

Convert integer to string representation.

§

String(ByteString)

A valid utf-8 string

§

Integer(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
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
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 ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Responses given by the service.
Errors produced by the service when polling readiness or executing call.
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
Shutdown service. Read more
Map this service’s output to a different type, returning a new service of the resulting type. Read more
Map this service’s error to a different error, returning a new service. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.