Trait redis_driver::StreamCommands
source · [−]pub trait StreamCommands<T>: PrepareCommand<T> {
Show 21 methods
fn xack<K, G, I, II>(
&self,
key: K,
group: G,
ids: II
) -> CommandResult<'_, T, usize>
where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
{ ... }
fn xadd<K, I, F, V, FFVV, R>(
&self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions
) -> CommandResult<'_, T, R>
where
K: Into<BulkString>,
I: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
{ ... }
fn xautoclaim<K, G, C, I, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions
) -> CommandResult<'_, T, XAutoClaimResult<V>>
where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
V: FromValue,
{ ... }
fn xclaim<K, G, C, I, II, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>
where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
{ ... }
fn xdel<K, I, II>(&self, key: K, ids: II) -> CommandResult<'_, T, usize>
where
K: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
{ ... }
fn xgroup_create<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions
) -> CommandResult<'_, T, bool>
where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
{ ... }
fn xgroup_createconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, bool>
where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
{ ... }
fn xgroup_delconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, usize>
where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
{ ... }
fn xgroup_destroy<K, G>(
&self,
key: K,
groupname: G
) -> CommandResult<'_, T, bool>
where
K: Into<BulkString>,
G: Into<BulkString>,
{ ... }
fn xgroup_setid<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>
) -> CommandResult<'_, T, ()>
where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
{ ... }
fn xinfo_consumers<K, G>(
&self,
key: K,
groupname: G
) -> CommandResult<'_, T, Vec<XConsumerInfo>>
where
K: Into<BulkString>,
G: Into<BulkString>,
{ ... }
fn xinfo_groups<K>(&self, key: K) -> CommandResult<'_, T, Vec<XGroupInfo>>
where
K: Into<BulkString>,
{ ... }
fn xinfo_stream<K>(
&self,
key: K,
options: XInfoStreamOptions
) -> CommandResult<'_, T, XStreamInfo>
where
K: Into<BulkString>,
{ ... }
fn xlen<K>(&self, key: K) -> CommandResult<'_, T, usize>
where
K: Into<BulkString>,
{ ... }
fn xpending<K, G>(
&self,
key: K,
group: G
) -> CommandResult<'_, T, XPendingResult>
where
K: Into<BulkString>,
G: Into<BulkString>,
{ ... }
fn xpending_with_options<K, G>(
&self,
key: K,
group: G,
options: XPendingOptions
) -> CommandResult<'_, T, Vec<XPendingMessageResult>>
where
K: Into<BulkString>,
G: Into<BulkString>,
{ ... }
fn xrange<K, S, E, V>(
&self,
key: K,
start: S,
end: E,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>
where
K: Into<BulkString>,
S: Into<BulkString>,
E: Into<BulkString>,
V: FromValue,
{ ... }
fn xread<K, KK, I, II, V>(
&self,
options: XReadOptions,
keys: KK,
ids: II
) -> CommandResult<'_, T, Vec<XReadStreamResult<V>>>
where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
{ ... }
fn xreadgroup<G, C, K, KK, I, II, V>(
&self,
group: G,
consumer: C,
options: XReadGroupOptions,
keys: KK,
ids: II
) -> CommandResult<'_, T, Vec<XReadStreamResult<V>>>
where
G: Into<BulkString>,
C: Into<BulkString>,
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
{ ... }
fn xrevrange<K, E, S, V>(
&self,
key: K,
end: E,
start: S,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>
where
K: Into<BulkString>,
E: Into<BulkString>,
S: Into<BulkString>,
V: FromValue,
{ ... }
fn xtrim<K>(
&self,
key: K,
options: XTrimOptions
) -> CommandResult<'_, T, usize>
where
K: Into<BulkString>,
{ ... }
}
Expand description
Provided Methods
sourcefn xack<K, G, I, II>(
&self,
key: K,
group: G,
ids: II
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
fn xack<K, G, I, II>(
&self,
key: K,
group: G,
ids: II
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
The XACK command removes one or multiple messages from the Pending Entries List (PEL) of a stream consumer group
Return
The command returns the number of messages successfully acknowledged. Certain message IDs may no longer be part of the PEL (for example because they have already been acknowledged), and XACK will not count them as successfully acknowledged.
See Also
sourcefn xadd<K, I, F, V, FFVV, R>(
&self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions
) -> CommandResult<'_, T, R>where
K: Into<BulkString>,
I: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
fn xadd<K, I, F, V, FFVV, R>(
&self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions
) -> CommandResult<'_, T, R>where
K: Into<BulkString>,
I: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
Appends the specified stream entry to the stream at the specified key.
Return
the ID of the added entry.
The ID is the one auto-generated if * is passed as ID argument, otherwise the command just returns the same ID specified by the user during insertion.
The command returns a Null reply when used with create_stream=false and the key doesn’t exist.
See Also
sourcefn xautoclaim<K, G, C, I, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions
) -> CommandResult<'_, T, XAutoClaimResult<V>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
V: FromValue,
fn xautoclaim<K, G, C, I, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions
) -> CommandResult<'_, T, XAutoClaimResult<V>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
V: FromValue,
sourcefn xclaim<K, G, C, I, II, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
fn xclaim<K, G, C, I, II, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
In the context of a stream consumer group, this command changes the ownership of a pending message, so that the new owner is the consumer specified as the command argument.
Return
The ID of the added entry.
The ID is the one auto-generated if * is passed as ID argument, otherwise the command just returns the same ID specified by the user during insertion.
The command returns a Null reply when used with create_stream=false and the key doesn’t exist.
See Also
sourcefn xdel<K, I, II>(&self, key: K, ids: II) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
fn xdel<K, I, II>(&self, key: K, ids: II) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
sourcefn xgroup_create<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
fn xgroup_create<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
sourcefn xgroup_createconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
fn xgroup_createconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
sourcefn xgroup_delconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
fn xgroup_delconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
sourcefn xgroup_destroy<K, G>(&self, key: K, groupname: G) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xgroup_destroy<K, G>(&self, key: K, groupname: G) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
sourcefn xgroup_setid<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
fn xgroup_setid<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
sourcefn xinfo_consumers<K, G>(
&self,
key: K,
groupname: G
) -> CommandResult<'_, T, Vec<XConsumerInfo>>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xinfo_consumers<K, G>(
&self,
key: K,
groupname: G
) -> CommandResult<'_, T, Vec<XConsumerInfo>>where
K: Into<BulkString>,
G: Into<BulkString>,
sourcefn xinfo_groups<K>(&self, key: K) -> CommandResult<'_, T, Vec<XGroupInfo>>where
K: Into<BulkString>,
fn xinfo_groups<K>(&self, key: K) -> CommandResult<'_, T, Vec<XGroupInfo>>where
K: Into<BulkString>,
sourcefn xinfo_stream<K>(
&self,
key: K,
options: XInfoStreamOptions
) -> CommandResult<'_, T, XStreamInfo>where
K: Into<BulkString>,
fn xinfo_stream<K>(
&self,
key: K,
options: XInfoStreamOptions
) -> CommandResult<'_, T, XStreamInfo>where
K: Into<BulkString>,
sourcefn xlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn xlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
sourcefn xpending<K, G>(&self, key: K, group: G) -> CommandResult<'_, T, XPendingResult>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xpending<K, G>(&self, key: K, group: G) -> CommandResult<'_, T, XPendingResult>where
K: Into<BulkString>,
G: Into<BulkString>,
The XPENDING command is the interface to inspect the list of pending messages.
See Also
sourcefn xpending_with_options<K, G>(
&self,
key: K,
group: G,
options: XPendingOptions
) -> CommandResult<'_, T, Vec<XPendingMessageResult>>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xpending_with_options<K, G>(
&self,
key: K,
group: G,
options: XPendingOptions
) -> CommandResult<'_, T, Vec<XPendingMessageResult>>where
K: Into<BulkString>,
G: Into<BulkString>,
The XPENDING command is the interface to inspect the list of pending messages.
See Also
sourcefn xrange<K, S, E, V>(
&self,
key: K,
start: S,
end: E,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: Into<BulkString>,
V: FromValue,
fn xrange<K, S, E, V>(
&self,
key: K,
start: S,
end: E,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: Into<BulkString>,
V: FromValue,
The command returns the stream entries matching a given range of IDs.
Return
A collection of StreamEntry
The command returns the entries with IDs matching the specified range. The returned entries are complete, that means that the ID and all the fields they are composed are returned. Moreover, the entries are returned with their fields and values in the exact same order as XADD added them.