[−][src]Enum redis::Value
Internal low-level redis value enum.
Variants
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.
An arbitary binary data.
A bulk response of more data. This is generally used by redis to express nested structures.
Status(String)
A status response.
A status response which represents the string "OK".
Implementations
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.
pub fn as_sequence(&self) -> Option<&[Value]>
[src]
Returns an &[Value]
if self
is compatible with a sequence type
pub fn as_map_iter(&self) -> Option<MapIter<'_>>
[src]
Returns an iterator of (&Value, &Value)
if self
is compatible with a map type
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl Eq for Value
[src]
impl FromRedisValue for Value
[src]
pub fn from_redis_value(v: &Value) -> RedisResult<Value>
[src]
pub fn from_redis_values(items: &[Value]) -> RedisResult<Vec<Self>>
[src]
impl PartialEq<Value> for Value
[src]
impl StructuralEq for Value
[src]
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
[src]
impl Send for Value
[src]
impl Sync for Value
[src]
impl Unpin for Value
[src]
impl UnwindSafe for Value
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,