Enum ntex_redis::codec::Request [−][src]
pub enum Request {
Array(Vec<Request>),
BulkString(BulkString),
BulkStatic(&'static [u8]),
BulkInteger(i64),
String(ByteString),
Integer(i64),
}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
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.
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
impl Request[src]
impl Request[src]pub fn from_static(data: &'static str) -> Self[src]
Create request from static str
pub fn from_bstatic(data: &'static [u8]) -> Self[src]
Create request from static str
pub fn add<T>(self, other: T) -> Self where
Request: From<T>, [src]
Request: From<T>,
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.
pub fn extend<T>(self, other: impl IntoIterator<Item = T>) -> Self where
Request: From<T>, [src]
Request: From<T>,
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
impl StructuralEq for Request[src]
impl StructuralEq for Request[src]impl StructuralPartialEq for Request[src]
impl StructuralPartialEq for Request[src]Auto Trait Implementations
impl RefUnwindSafe for Request
impl RefUnwindSafe for Requestimpl UnwindSafe for Request
impl UnwindSafe for RequestBlanket Implementations
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
Should always be Self