pub struct Pipeline<'a> { /* private fields */ }Expand description
Builder-style write queue. Returned by Store::pipeline; call
fluent methods to enqueue + commit() to apply with batched
AOF fsync.
Implementations§
Source§impl<'a> Pipeline<'a>
impl<'a> Pipeline<'a>
pub fn set(self, key: &[u8], value: &[u8]) -> Self
pub fn del(self, keys: &[&[u8]]) -> Self
pub fn incr(self, key: &[u8]) -> Self
pub fn incr_by(self, key: &[u8], delta: i64) -> Self
pub fn hset(self, key: &[u8], pairs: &[(&[u8], &[u8])]) -> Self
pub fn hdel(self, key: &[u8], fields: &[&[u8]]) -> Self
pub fn hincrby(self, key: &[u8], field: &[u8], delta: i64) -> Self
pub fn zadd(self, key: &[u8], pairs: &[(f64, &[u8])]) -> Self
Sourcepub fn zadd_flags(
self,
key: &[u8],
pairs: &[(f64, &[u8])],
flags: ZaddFlags,
) -> Self
pub fn zadd_flags( self, key: &[u8], pairs: &[(f64, &[u8])], flags: ZaddFlags, ) -> Self
Flags-aware ZADD (v2.1) — e.g. the GT monotonic-heal form.
pub fn zrem(self, key: &[u8], members: &[&[u8]]) -> Self
pub fn zincrby(self, key: &[u8], delta: f64, member: &[u8]) -> Self
pub fn sadd(self, key: &[u8], members: &[&[u8]]) -> Self
pub fn srem(self, key: &[u8], members: &[&[u8]]) -> Self
pub fn lpush(self, key: &[u8], values: &[&[u8]]) -> Self
pub fn rpush(self, key: &[u8], values: &[&[u8]]) -> Self
Sourcepub fn commit(self) -> Result<()>
pub fn commit(self) -> Result<()>
Apply every queued op in order. Each op acquires its own
per-shard write lock — other writers see intermediate states
between ops; for transactional semantics use Store::atomic
instead. AOF appends batch into one fsync per shard.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Pipeline<'a>
impl<'a> !UnwindSafe for Pipeline<'a>
impl<'a> Freeze for Pipeline<'a>
impl<'a> Send for Pipeline<'a>
impl<'a> Sync for Pipeline<'a>
impl<'a> Unpin for Pipeline<'a>
impl<'a> UnsafeUnpin for Pipeline<'a>
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