[][src]Enum trezm_redis::Value

pub enum Value {
    Nil,
    Int(i64),
    Data(Vec<u8>),
    Bulk(Vec<Value>),
    Status(String),
    Okay,
}

Internal low-level redis value enum.

Variants

Nil

A nil response from the server.

Int(i64)

An integer response. Note that there are a few situations in which redis actually returns a string for an integer which is why this library generally treats integers and strings the same for all numeric responses.

Data(Vec<u8>)

An arbitary binary data.

Bulk(Vec<Value>)

A bulk response of more data. This is generally used by redis to express nested structures.

Status(String)

A status response.

Okay

A status response which represents the string "OK".

Methods

impl Value[src]

Values are generally not used directly unless you are using the more low level functionality in the library. For the most part this is hidden with the help of the FromRedisValue trait.

While on the redis protocol there is an error type this is already separated at an early point so the value only holds the remaining types.

pub fn looks_like_cursor(&self) -> bool[src]

Checks if the return value looks like it fulfils the cursor protocol. That means the result is a bulk item of length two with the first one being a cursor and the second a bulk response.

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Eq for Value[src]

impl FromRedisValue for Value[src]

impl PartialEq<Value> for Value[src]

impl StructuralEq for Value[src]

impl StructuralPartialEq for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

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<T> From<T> for T[src]

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

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