Trait rustis::commands::BlockingCommands
source · pub trait BlockingCommands<'a> {
// Required method
async fn monitor(self) -> Result<MonitorStream>;
// Provided methods
fn blmove<S, D, E>(
self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere,
timeout: f64
) -> PreparedCommand<'a, Self, E>
where Self: Sized,
S: SingleArg,
D: SingleArg,
E: PrimitiveResponse { ... }
fn blmpop<K, KK, E>(
self,
timeout: f64,
keys: KK,
where_: LMoveWhere,
count: usize
) -> PreparedCommand<'a, Self, Option<(String, Vec<E>)>>
where Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
E: PrimitiveResponse + DeserializeOwned { ... }
fn blpop<K, KK, K1, V>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, Option<(K1, V)>>
where Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
V: PrimitiveResponse + DeserializeOwned { ... }
fn brpop<K, KK, K1, V>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, Option<(K1, V)>>
where Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
V: PrimitiveResponse + DeserializeOwned { ... }
fn bzmpop<K, KK, E>(
self,
timeout: f64,
keys: KK,
where_: ZWhere,
count: usize
) -> PreparedCommand<'a, Self, Option<ZMPopResult<E>>>
where Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
E: PrimitiveResponse + DeserializeOwned { ... }
fn bzpopmax<K, KK, E, K1>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, BZpopMinMaxResult<K1, E>>
where Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
E: PrimitiveResponse + DeserializeOwned { ... }
fn bzpopmin<K, KK, E, K1>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, BZpopMinMaxResult<K1, E>>
where Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
E: PrimitiveResponse + DeserializeOwned { ... }
}
Expand description
A group of blocking commands
Required Methods§
sourceasync fn monitor(self) -> Result<MonitorStream>
async fn monitor(self) -> Result<MonitorStream>
Debugging command that streams back every command processed by the Redis server.
§See Also
Provided Methods§
sourcefn blmove<S, D, E>(
self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere,
timeout: f64
) -> PreparedCommand<'a, Self, E>
fn blmove<S, D, E>( self, source: S, destination: D, where_from: LMoveWhere, where_to: LMoveWhere, timeout: f64 ) -> PreparedCommand<'a, Self, E>
sourcefn blmpop<K, KK, E>(
self,
timeout: f64,
keys: KK,
where_: LMoveWhere,
count: usize
) -> PreparedCommand<'a, Self, Option<(String, Vec<E>)>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
E: PrimitiveResponse + DeserializeOwned,
fn blmpop<K, KK, E>(
self,
timeout: f64,
keys: KK,
where_: LMoveWhere,
count: usize
) -> PreparedCommand<'a, Self, Option<(String, Vec<E>)>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
E: PrimitiveResponse + DeserializeOwned,
sourcefn blpop<K, KK, K1, V>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, Option<(K1, V)>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
V: PrimitiveResponse + DeserializeOwned,
fn blpop<K, KK, K1, V>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, Option<(K1, V)>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
V: PrimitiveResponse + DeserializeOwned,
This command is a blocking list pop primitive.
It is the blocking version of lpop
because it
blocks the connection when there are no elements to pop from any of the given lists.
An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given.
§Return
None
when no element could be popped and the timeout expired- a tuple with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
§See Also
sourcefn brpop<K, KK, K1, V>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, Option<(K1, V)>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
V: PrimitiveResponse + DeserializeOwned,
fn brpop<K, KK, K1, V>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, Option<(K1, V)>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
V: PrimitiveResponse + DeserializeOwned,
This command is a blocking list pop primitive.
It is the blocking version of rpop
because it
blocks the connection when there are no elements to pop from any of the given lists.
An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given.
§Return
None
when no element could be popped and the timeout expired- a tuple with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
§See Also
sourcefn bzmpop<K, KK, E>(
self,
timeout: f64,
keys: KK,
where_: ZWhere,
count: usize
) -> PreparedCommand<'a, Self, Option<ZMPopResult<E>>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
E: PrimitiveResponse + DeserializeOwned,
fn bzmpop<K, KK, E>(
self,
timeout: f64,
keys: KK,
where_: ZWhere,
count: usize
) -> PreparedCommand<'a, Self, Option<ZMPopResult<E>>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
E: PrimitiveResponse + DeserializeOwned,
sourcefn bzpopmax<K, KK, E, K1>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, BZpopMinMaxResult<K1, E>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
E: PrimitiveResponse + DeserializeOwned,
fn bzpopmax<K, KK, E, K1>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, BZpopMinMaxResult<K1, E>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
E: PrimitiveResponse + DeserializeOwned,
This command is the blocking variant of zpopmax
.
§Return
None
when no element could be popped and the timeout expired.- The list of tuple with
- the first element being the name of the key where a member was popped,
- the second element is the popped member itself,
- and the third element is the score of the popped element.
§See Also
sourcefn bzpopmin<K, KK, E, K1>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, BZpopMinMaxResult<K1, E>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
E: PrimitiveResponse + DeserializeOwned,
fn bzpopmin<K, KK, E, K1>(
self,
keys: KK,
timeout: f64
) -> PreparedCommand<'a, Self, BZpopMinMaxResult<K1, E>>where
Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
K1: PrimitiveResponse + DeserializeOwned,
E: PrimitiveResponse + DeserializeOwned,
This command is the blocking variant of zpopmin
.
§Return
None
when no element could be popped and the timeout expired.- The list of tuple with
- the first element being the name of the key where a member was popped,
- the second element is the popped member itself,
- and the third element is the score of the popped element.