[−][src]Enum darkredis::Value
Enum depicting the various possible responses one can get from Redis.
Variants
Ok
A Redis OK
response.
Nil
Nil Response.
Array(Vec<Value>)
Array response.
Integer(isize)
Integer response.
String(Vec<u8>)
String response. This cannot be a String
type, because Redis strings need not be valid UTF-8, unlike Rust.
Methods
impl Value
[src]
pub fn unwrap_integer(self) -> isize
[src]
pub fn unwrap_array(self) -> Vec<Value>
[src]
pub fn unwrap_string(self) -> Vec<u8>
[src]
pub fn optional_string(self) -> Option<Vec<u8>>
[src]
Like unwrap_string
, but returns an Option
instead of panicking.
pub fn optional_array(self) -> Option<Vec<Value>>
[src]
Like unwrap_array
, but returns an Option
instead of panicking.
pub fn optional_integer(self) -> Option<isize>
[src]
Like unwrap_integer
, but returns an Option
instead of panicking.
Trait Implementations
Auto Trait Implementations
impl Sync for Value
impl Send for Value
impl Unpin for Value
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,