Enum actix_redis::RespValue[][src]

pub enum RespValue {
    Nil,
    Array(Vec<RespValue, Global>),
    BulkString(Vec<u8, Global>),
    Error(String),
    Integer(i64),
    SimpleString(String),
}

A single RESP value, this owns the data that is read/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

Nil

Zero, one or more other RespValues.

BulkString(Vec<u8, Global>)

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.

Error(String)

An error from the Redis server

Integer(i64)

Redis documentation defines an integer as being a signed 64-bit integer: https://redis.io/topics/protocol#resp-integers

SimpleString(String)

Implementations

impl RespValue[src]

pub fn append<T>(self, other: impl IntoIterator<Item = T>) -> RespValue where
    T: Into<RespValue>, 
[src]

Convenience function for building dynamic Redis commands with variable numbers of arguments, e.g. RPUSH

This will panic if called for anything other than arrays

pub fn push<T>(&mut self, item: T) where
    T: Into<RespValue>, 
[src]

Push item to Resp array

This will panic if called for anything other than arrays

Trait Implementations

impl Clone for RespValue[src]

impl Debug for RespValue[src]

impl Eq for RespValue[src]

impl<'a> From<&'a [u8]> for RespValue[src]

impl<'a> From<&'a String> for RespValue[src]

impl<'a> From<&'a str> for RespValue[src]

impl<'a> From<Arc<str>> for RespValue[src]

impl<'a> From<String> for RespValue[src]

impl<'a> From<Vec<u8, Global>> for RespValue[src]

impl<'a> From<usize> for RespValue[src]

impl FromResp for RespValue[src]

impl PartialEq<RespValue> for RespValue[src]

impl StructuralEq for RespValue[src]

impl StructuralPartialEq for RespValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,