pub enum RedisValue {
Nil,
Int(i64),
Data(Vec<u8>),
Bulk(ResponseStream),
Status(String),
Okay,
}Expand description
A value returned from a redis command
Variants§
Nil
An explicit nil value was returned from the server
Int(i64)
An explicit integer value was returned from the server
Data(Vec<u8>)
A data blob was returned from the server
Bulk(ResponseStream)
A bulk response stream was returned from the server. This is used for commands that return multiple values. You iterate over it to get each individual value.
Status(String)
A status message was returned from the server
Okay
An okay response was returned from the server
Implementations§
Source§impl RedisValue
impl RedisValue
Sourcepub fn extract<T: Extract>(self) -> FunctionResult<T>
pub fn extract<T: Extract>(self) -> FunctionResult<T>
try to extract the value as a specific type
Only works for Data responses.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RedisValue
impl RefUnwindSafe for RedisValue
impl Send for RedisValue
impl Sync for RedisValue
impl Unpin for RedisValue
impl UnwindSafe for RedisValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more