pub type RedisResult<T> = Result<T, RedisError>;Expand description
Library generic result type.
Aliased Type§
pub enum RedisResult<T> {
Ok(T),
Err(RedisError),
}Variants§
Trait Implementations§
Source§impl<T: FromRedisValue> FromRedisValue for RedisResult<T>
impl<T: FromRedisValue> FromRedisValue for RedisResult<T>
Source§fn from_redis_value_ref(value: &Value) -> Result<Self, ParsingError>
fn from_redis_value_ref(value: &Value) -> Result<Self, ParsingError>
Given a redis
Value this attempts to convert it into the given
destination type. If that fails because it’s not compatible an
appropriate error is generated.Source§fn from_redis_value(value: Value) -> Result<Self, ParsingError>
fn from_redis_value(value: Value) -> Result<Self, ParsingError>
Given a redis
Value this attempts to convert it into the given
destination type. If that fails because it’s not compatible an
appropriate error is generated.Source§fn from_redis_value_refs(items: &[Value]) -> Result<Vec<Self>, ParsingError>
fn from_redis_value_refs(items: &[Value]) -> Result<Vec<Self>, ParsingError>
Similar to
from_redis_value_ref but constructs a vector of objects
from another vector of values. This primarily exists internally
to customize the behavior for vectors of tuples.Source§fn from_redis_values(items: Vec<Value>) -> Result<Vec<Self>, ParsingError>
fn from_redis_values(items: Vec<Value>) -> Result<Vec<Self>, ParsingError>
The same as
from_redis_value_refs, but takes a Vec<Value> instead
of a &[Value].Source§fn from_each_redis_values(items: Vec<Value>) -> Vec<Result<Self, ParsingError>>
fn from_each_redis_values(items: Vec<Value>) -> Vec<Result<Self, ParsingError>>
The same as
from_redis_values, but returns a result for each
conversion to make handling them case-by-case possible.Source§fn from_byte_slice(_vec: &[u8]) -> Option<Vec<Self>>
fn from_byte_slice(_vec: &[u8]) -> Option<Vec<Self>>
Convert bytes to a single element vector.
Source§fn from_byte_vec(_vec: Vec<u8>) -> Result<Vec<Self>, ParsingError>
fn from_byte_vec(_vec: Vec<u8>) -> Result<Vec<Self>, ParsingError>
Convert bytes to a single element vector.