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.
Auto Trait Implementations§
impl Freeze for MockCmd
impl !RefUnwindSafe for MockCmd
impl Send for MockCmd
impl Sync for MockCmd
impl Unpin for MockCmd
impl UnsafeUnpin for MockCmd
impl !UnwindSafe for MockCmd
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