pub trait StreamCommands {
Show 21 methods
// Provided methods
fn xack<K, G, I, II>(
&mut self,
key: K,
group: G,
ids: II,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I> { ... }
fn xadd<K, I, F, V, FFVV, R>(
&mut self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions,
) -> PreparedCommand<'_, Self, R>
where Self: Sized,
K: Into<CommandArg>,
I: Into<CommandArg>,
F: Into<CommandArg>,
V: Into<CommandArg>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue { ... }
fn xautoclaim<K, G, C, I, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions,
) -> PreparedCommand<'_, Self, XAutoClaimResult<V>>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
V: FromValue { ... }
fn xclaim<K, G, C, I, II, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue { ... }
fn xdel<K, I, II>(
&mut self,
key: K,
ids: II,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I> { ... }
fn xgroup_create<K, G, I>(
&mut self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions,
) -> PreparedCommand<'_, Self, bool>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
I: Into<CommandArg> { ... }
fn xgroup_createconsumer<K, G, C>(
&mut self,
key: K,
groupname: G,
consumername: C,
) -> PreparedCommand<'_, Self, bool>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg> { ... }
fn xgroup_delconsumer<K, G, C>(
&mut self,
key: K,
groupname: G,
consumername: C,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg> { ... }
fn xgroup_destroy<K, G>(
&mut self,
key: K,
groupname: G,
) -> PreparedCommand<'_, Self, bool>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg> { ... }
fn xgroup_setid<K, G, I>(
&mut self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>,
) -> PreparedCommand<'_, Self, ()>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
I: Into<CommandArg> { ... }
fn xinfo_consumers<K, G>(
&mut self,
key: K,
groupname: G,
) -> PreparedCommand<'_, Self, Vec<XConsumerInfo>>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg> { ... }
fn xinfo_groups<K>(
&mut self,
key: K,
) -> PreparedCommand<'_, Self, Vec<XGroupInfo>>
where Self: Sized,
K: Into<CommandArg> { ... }
fn xinfo_stream<K>(
&mut self,
key: K,
options: XInfoStreamOptions,
) -> PreparedCommand<'_, Self, XStreamInfo>
where Self: Sized,
K: Into<CommandArg> { ... }
fn xlen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg> { ... }
fn xpending<K, G>(
&mut self,
key: K,
group: G,
) -> PreparedCommand<'_, Self, XPendingResult>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg> { ... }
fn xpending_with_options<K, G>(
&mut self,
key: K,
group: G,
options: XPendingOptions,
) -> PreparedCommand<'_, Self, Vec<XPendingMessageResult>>
where Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg> { ... }
fn xrange<K, S, E, V>(
&mut self,
key: K,
start: S,
end: E,
count: Option<usize>,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
where Self: Sized,
K: Into<CommandArg>,
S: Into<CommandArg>,
E: Into<CommandArg>,
V: FromValue { ... }
fn xread<K, KK, I, II, V, R>(
&mut self,
options: XReadOptions,
keys: KK,
ids: II,
) -> PreparedCommand<'_, Self, R>
where Self: Sized,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
R: FromKeyValueValueArray<String, Vec<StreamEntry<V>>> { ... }
fn xreadgroup<G, C, K, KK, I, II, V, R>(
&mut self,
group: G,
consumer: C,
options: XReadGroupOptions,
keys: KK,
ids: II,
) -> PreparedCommand<'_, Self, R>
where Self: Sized,
G: Into<CommandArg>,
C: Into<CommandArg>,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
R: FromKeyValueValueArray<String, Vec<StreamEntry<V>>> { ... }
fn xrevrange<K, E, S, V>(
&mut self,
key: K,
end: E,
start: S,
count: Option<usize>,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
where Self: Sized,
K: Into<CommandArg>,
E: Into<CommandArg>,
S: Into<CommandArg>,
V: FromValue { ... }
fn xtrim<K>(
&mut self,
key: K,
options: XTrimOptions,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg> { ... }
}
Expand description
Provided Methods§
Sourcefn xack<K, G, I, II>(
&mut self,
key: K,
group: G,
ids: II,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
fn xack<K, G, I, II>(
&mut self,
key: K,
group: G,
ids: II,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
I: Into<CommandArg>,
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>(
&mut self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
K: Into<CommandArg>,
I: Into<CommandArg>,
F: Into<CommandArg>,
V: Into<CommandArg>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
fn xadd<K, I, F, V, FFVV, R>(
&mut self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
K: Into<CommandArg>,
I: Into<CommandArg>,
F: Into<CommandArg>,
V: Into<CommandArg>,
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>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions,
) -> PreparedCommand<'_, Self, XAutoClaimResult<V>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
V: FromValue,
fn xautoclaim<K, G, C, I, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions,
) -> PreparedCommand<'_, Self, XAutoClaimResult<V>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
V: FromValue,
Sourcefn xclaim<K, G, C, I, II, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
fn xclaim<K, G, C, I, II, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
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>(
&mut self,
key: K,
ids: II,
) -> PreparedCommand<'_, Self, usize>
fn xdel<K, I, II>( &mut self, key: K, ids: II, ) -> PreparedCommand<'_, Self, usize>
Sourcefn xgroup_create<K, G, I>(
&mut self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions,
) -> PreparedCommand<'_, Self, bool>
fn xgroup_create<K, G, I>( &mut self, key: K, groupname: G, id: I, options: XGroupCreateOptions, ) -> PreparedCommand<'_, Self, bool>
Sourcefn xgroup_createconsumer<K, G, C>(
&mut self,
key: K,
groupname: G,
consumername: C,
) -> PreparedCommand<'_, Self, bool>
fn xgroup_createconsumer<K, G, C>( &mut self, key: K, groupname: G, consumername: C, ) -> PreparedCommand<'_, Self, bool>
Sourcefn xgroup_delconsumer<K, G, C>(
&mut self,
key: K,
groupname: G,
consumername: C,
) -> PreparedCommand<'_, Self, usize>
fn xgroup_delconsumer<K, G, C>( &mut self, key: K, groupname: G, consumername: C, ) -> PreparedCommand<'_, Self, usize>
Sourcefn xgroup_destroy<K, G>(
&mut self,
key: K,
groupname: G,
) -> PreparedCommand<'_, Self, bool>
fn xgroup_destroy<K, G>( &mut self, key: K, groupname: G, ) -> PreparedCommand<'_, Self, bool>
Sourcefn xgroup_setid<K, G, I>(
&mut self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>,
) -> PreparedCommand<'_, Self, ()>
fn xgroup_setid<K, G, I>( &mut self, key: K, groupname: G, id: I, entries_read: Option<usize>, ) -> PreparedCommand<'_, Self, ()>
Sourcefn xinfo_consumers<K, G>(
&mut self,
key: K,
groupname: G,
) -> PreparedCommand<'_, Self, Vec<XConsumerInfo>>
fn xinfo_consumers<K, G>( &mut self, key: K, groupname: G, ) -> PreparedCommand<'_, Self, Vec<XConsumerInfo>>
Sourcefn xinfo_groups<K>(
&mut self,
key: K,
) -> PreparedCommand<'_, Self, Vec<XGroupInfo>>
fn xinfo_groups<K>( &mut self, key: K, ) -> PreparedCommand<'_, Self, Vec<XGroupInfo>>
Sourcefn xinfo_stream<K>(
&mut self,
key: K,
options: XInfoStreamOptions,
) -> PreparedCommand<'_, Self, XStreamInfo>
fn xinfo_stream<K>( &mut self, key: K, options: XInfoStreamOptions, ) -> PreparedCommand<'_, Self, XStreamInfo>
Sourcefn xlen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
fn xlen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
Sourcefn xpending<K, G>(
&mut self,
key: K,
group: G,
) -> PreparedCommand<'_, Self, XPendingResult>
fn xpending<K, G>( &mut self, key: K, group: G, ) -> PreparedCommand<'_, Self, XPendingResult>
The XPENDING command is the interface to inspect the list of pending messages.
§See Also
Sourcefn xpending_with_options<K, G>(
&mut self,
key: K,
group: G,
options: XPendingOptions,
) -> PreparedCommand<'_, Self, Vec<XPendingMessageResult>>
fn xpending_with_options<K, G>( &mut self, key: K, group: G, options: XPendingOptions, ) -> PreparedCommand<'_, Self, Vec<XPendingMessageResult>>
The XPENDING command is the interface to inspect the list of pending messages.
§See Also
Sourcefn xrange<K, S, E, V>(
&mut self,
key: K,
start: S,
end: E,
count: Option<usize>,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
fn xrange<K, S, E, V>( &mut self, key: K, start: S, end: E, count: Option<usize>, ) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
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.