pub struct Pipeline { /* private fields */ }Expand description
A batch of commands to be sent in a single network round-trip.
Build the pipeline with the typed builder methods, then execute it
with [Client::execute_pipeline].
Implementations§
Source§impl Pipeline
impl Pipeline
Sourcepub fn send(self, args: &[&str]) -> Self
pub fn send(self, args: &[&str]) -> Self
Queues a raw command from string slices.
Useful for commands not covered by the typed builders.
Sourcepub fn lpush<V: AsRef<[u8]>>(self, key: &str, values: &[V]) -> Self
pub fn lpush<V: AsRef<[u8]>>(self, key: &str, values: &[V]) -> Self
Queues an LPUSH key value [value ...] command.
Sourcepub fn rpush<V: AsRef<[u8]>>(self, key: &str, values: &[V]) -> Self
pub fn rpush<V: AsRef<[u8]>>(self, key: &str, values: &[V]) -> Self
Queues an RPUSH key value [value ...] command.
Sourcepub fn hset<V: AsRef<[u8]>>(self, key: &str, pairs: &[(&str, V)]) -> Self
pub fn hset<V: AsRef<[u8]>>(self, key: &str, pairs: &[(&str, V)]) -> Self
Queues an HSET key field value [field value ...] command.
Sourcepub fn hdel(self, key: &str, fields: &[&str]) -> Self
pub fn hdel(self, key: &str, fields: &[&str]) -> Self
Queues an HDEL key field [field ...] command.
Sourcepub fn hincrby(self, key: &str, field: &str, delta: i64) -> Self
pub fn hincrby(self, key: &str, field: &str, delta: i64) -> Self
Queues an HINCRBY key field delta command.
Sourcepub fn sadd(self, key: &str, members: &[&str]) -> Self
pub fn sadd(self, key: &str, members: &[&str]) -> Self
Queues an SADD key member [member ...] command.
Sourcepub fn srem(self, key: &str, members: &[&str]) -> Self
pub fn srem(self, key: &str, members: &[&str]) -> Self
Queues an SREM key member [member ...] command.
Sourcepub fn zadd(self, key: &str, members: &[(f64, &str)]) -> Self
pub fn zadd(self, key: &str, members: &[(f64, &str)]) -> Self
Queues a ZADD key score member [score member ...] command.
Sourcepub fn incr_by_float(self, key: &str, delta: f64) -> Self
pub fn incr_by_float(self, key: &str, delta: f64) -> Self
Queues an INCRBYFLOAT key delta command.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pipeline
impl RefUnwindSafe for Pipeline
impl Send for Pipeline
impl Sync for Pipeline
impl Unpin for Pipeline
impl UnsafeUnpin for Pipeline
impl UnwindSafe for Pipeline
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