pub struct Queue<'a> { /* private fields */ }Expand description
The group’s commands, queued on a pipeline or a transaction.
What each replies is read from exec, in the order queued.
Implementations§
Source§impl Queue<'_>
impl Queue<'_>
Sourcepub fn exists(&mut self, key: impl ToRedisArgs) -> &mut Self
pub fn exists(&mut self, key: impl ToRedisArgs) -> &mut Self
Whether the key exists.
Sourcepub fn ttl(&mut self, key: impl ToRedisArgs) -> &mut Self
pub fn ttl(&mut self, key: impl ToRedisArgs) -> &mut Self
The seconds until the key expires: -1 if it never does, -2 if it does not exist.
Sourcepub fn pttl(&mut self, key: impl ToRedisArgs) -> &mut Self
pub fn pttl(&mut self, key: impl ToRedisArgs) -> &mut Self
The milliseconds until the key expires: -1 if it never does, -2 if it does not exist.
Sourcepub fn key_type(&mut self, key: impl ToRedisArgs) -> &mut Self
pub fn key_type(&mut self, key: impl ToRedisArgs) -> &mut Self
The type of the value at the key: string, list, set, zset,
hash, stream, or none if it does not exist.
Sourcepub fn expire_time(&mut self, key: impl ToRedisArgs) -> &mut Self
pub fn expire_time(&mut self, key: impl ToRedisArgs) -> &mut Self
The Unix time, in seconds, the key expires at: -1 if it never does, -2 if it does not exist.
Sourcepub fn del(&mut self, keys: impl ToRedisArgs) -> &mut Self
pub fn del(&mut self, keys: impl ToRedisArgs) -> &mut Self
Deletes the keys, returning how many existed.
Sourcepub fn unlink(&mut self, keys: impl ToRedisArgs) -> &mut Self
pub fn unlink(&mut self, keys: impl ToRedisArgs) -> &mut Self
Deletes the keys, reclaiming their memory in the background. Returns how many existed.
Sourcepub fn expire(&mut self, key: impl ToRedisArgs, seconds: i64) -> &mut Self
pub fn expire(&mut self, key: impl ToRedisArgs, seconds: i64) -> &mut Self
Has the key expire in seconds. false if it does not exist.
Sourcepub fn pexpire(&mut self, key: impl ToRedisArgs, milliseconds: i64) -> &mut Self
pub fn pexpire(&mut self, key: impl ToRedisArgs, milliseconds: i64) -> &mut Self
Has the key expire in milliseconds. false if it does not exist.
Sourcepub fn expire_at(&mut self, key: impl ToRedisArgs, timestamp: i64) -> &mut Self
pub fn expire_at(&mut self, key: impl ToRedisArgs, timestamp: i64) -> &mut Self
Has the key expire at a Unix time, in seconds. false if it does not
exist.
Sourcepub fn persist(&mut self, key: impl ToRedisArgs) -> &mut Self
pub fn persist(&mut self, key: impl ToRedisArgs) -> &mut Self
Removes the key’s expiry. false if it had none, or does not exist.
Sourcepub fn rename(
&mut self,
key: impl ToRedisArgs,
new_key: impl ToRedisArgs,
) -> &mut Self
pub fn rename( &mut self, key: impl ToRedisArgs, new_key: impl ToRedisArgs, ) -> &mut Self
Renames the key, replacing new_key if it exists.
Sourcepub fn rename_nx(
&mut self,
key: impl ToRedisArgs,
new_key: impl ToRedisArgs,
) -> &mut Self
pub fn rename_nx( &mut self, key: impl ToRedisArgs, new_key: impl ToRedisArgs, ) -> &mut Self
Renames the key unless new_key exists. false if it does.
Sourcepub fn copy(
&mut self,
source: impl ToRedisArgs,
destination: impl ToRedisArgs,
) -> &mut Self
pub fn copy( &mut self, source: impl ToRedisArgs, destination: impl ToRedisArgs, ) -> &mut Self
Copies the value at source to destination. false if destination
exists.
Sourcepub fn touch(&mut self, keys: impl ToRedisArgs) -> &mut Self
pub fn touch(&mut self, keys: impl ToRedisArgs) -> &mut Self
Marks the keys as used just now, returning how many exist.
Auto Trait Implementations§
impl<'a> !UnwindSafe for Queue<'a>
impl<'a> Forget for Queue<'a>
impl<'a> Freeze for Queue<'a>
impl<'a> Move for Queue<'a>
impl<'a> RefUnwindSafe for Queue<'a>
impl<'a> Send for Queue<'a>
impl<'a> Sync for Queue<'a>
impl<'a> Unpin for Queue<'a>
impl<'a> UnsafeUnpin for Queue<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request