Struct redis_test::MockCmd
source · pub struct MockCmd { /* private fields */ }
Expand description
Represents a command to be executed against a MockConnection
.
Implementations§
source§impl MockCmd
impl MockCmd
sourcepub fn new<C, V>(cmd: C, response: Result<V, RedisError>) -> Selfwhere
C: IntoRedisCmdBytes,
V: IntoRedisValue,
pub fn new<C, V>(cmd: C, response: Result<V, RedisError>) -> Selfwhere C: IntoRedisCmdBytes, V: IntoRedisValue,
Create a new MockCmd
given a Redis command and either a value convertible to
a redis::Value
or a RedisError
.
sourcepub fn with_values<C, V>(cmd: C, responses: Result<Vec<V>, RedisError>) -> Selfwhere
C: IntoRedisCmdBytes,
V: IntoRedisValue,
pub fn with_values<C, V>(cmd: C, responses: Result<Vec<V>, RedisError>) -> Selfwhere C: IntoRedisCmdBytes, V: IntoRedisValue,
Create a new MockCommand
given a Redis command/pipeline and a vector of value convertible
to a redis::Value
or a RedisError
.