[][src]Enum redis_async::resp::RespValue

pub enum RespValue {
    Nil,
    Array(Vec<RespValue>),
    BulkString(Vec<u8>),
    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

NilArray(Vec<RespValue>)

Zero, one or more other RespValues.

BulkString(Vec<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.

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)

Methods

impl RespValue[src]

pub fn append<T>(self, other: &mut Vec<T>) -> Self where
    T: Into<RespValue>, 
[src]

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

Trait Implementations

impl FromResp for RespValue[src]

fn from_resp(resp: RespValue) -> Result<Self, Error>[src]

Return a Result containing either Self or Error. Errors can occur due to either: a) the particular RespValue being incompatible with the required type, or b) a remote Redis error occuring. Read more

impl Eq for RespValue[src]

impl Clone for RespValue[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<RespValue> for RespValue[src]

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

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

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

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

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

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

impl Debug for RespValue[src]

Auto Trait Implementations

impl Send for RespValue

impl Sync for RespValue

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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

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

impl<T> Erased for T