Trait rustis::commands::StreamCommands
source · pub trait StreamCommands<'a> {
Show 21 methods
// Provided methods
fn xack<K, G, I, II>(
self,
key: K,
group: G,
ids: II
) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg,
G: SingleArg,
I: SingleArg,
II: SingleArgCollection<I> { ... }
fn xadd<K, I, F, V, FFVV, R>(
self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions
) -> PreparedCommand<'a, Self, R>
where Self: Sized,
K: SingleArg,
I: SingleArg,
F: SingleArg,
V: SingleArg,
FFVV: KeyValueArgsCollection<F, V>,
R: PrimitiveResponse { ... }
fn xautoclaim<K, G, C, I, V>(
self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions
) -> PreparedCommand<'a, Self, XAutoClaimResult<V>>
where Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg,
I: SingleArg,
V: PrimitiveResponse + DeserializeOwned { ... }
fn xclaim<K, G, C, I, II, V>(
self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> PreparedCommand<'a, Self, Vec<StreamEntry<V>>>
where Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg,
I: SingleArg,
II: SingleArgCollection<I>,
V: PrimitiveResponse + DeserializeOwned { ... }
fn xdel<K, I, II>(self, key: K, ids: II) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg,
I: SingleArg,
II: SingleArgCollection<I> { ... }
fn xgroup_create<K, G, I>(
self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions
) -> PreparedCommand<'a, Self, bool>
where Self: Sized,
K: SingleArg,
G: SingleArg,
I: SingleArg { ... }
fn xgroup_createconsumer<K, G, C>(
self,
key: K,
groupname: G,
consumername: C
) -> PreparedCommand<'a, Self, bool>
where Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg { ... }
fn xgroup_delconsumer<K, G, C>(
self,
key: K,
groupname: G,
consumername: C
) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg { ... }
fn xgroup_destroy<K, G>(
self,
key: K,
groupname: G
) -> PreparedCommand<'a, Self, bool>
where Self: Sized,
K: SingleArg,
G: SingleArg { ... }
fn xgroup_setid<K, G, I>(
self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>
) -> PreparedCommand<'a, Self, ()>
where Self: Sized,
K: SingleArg,
G: SingleArg,
I: SingleArg { ... }
fn xinfo_consumers<K, G>(
self,
key: K,
groupname: G
) -> PreparedCommand<'a, Self, Vec<XConsumerInfo>>
where Self: Sized,
K: SingleArg,
G: SingleArg { ... }
fn xinfo_groups<K>(
self,
key: K
) -> PreparedCommand<'a, Self, Vec<XGroupInfo>>
where Self: Sized,
K: SingleArg { ... }
fn xinfo_stream<K>(
self,
key: K,
options: XInfoStreamOptions
) -> PreparedCommand<'a, Self, XStreamInfo>
where Self: Sized,
K: SingleArg { ... }
fn xlen<K>(self, key: K) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg { ... }
fn xpending<K, G>(
self,
key: K,
group: G
) -> PreparedCommand<'a, Self, XPendingResult>
where Self: Sized,
K: SingleArg,
G: SingleArg { ... }
fn xpending_with_options<K, G>(
self,
key: K,
group: G,
options: XPendingOptions
) -> PreparedCommand<'a, Self, Vec<XPendingMessageResult>>
where Self: Sized,
K: SingleArg,
G: SingleArg { ... }
fn xrange<K, S, E, V>(
self,
key: K,
start: S,
end: E,
count: Option<usize>
) -> PreparedCommand<'a, Self, Vec<StreamEntry<V>>>
where Self: Sized,
K: SingleArg,
S: SingleArg,
E: SingleArg,
V: PrimitiveResponse + DeserializeOwned { ... }
fn xread<K, KK, I, II, V, R>(
self,
options: XReadOptions,
keys: KK,
ids: II
) -> PreparedCommand<'a, Self, R>
where Self: Sized,
K: SingleArg,
KK: SingleArgCollection<K>,
I: SingleArg,
II: SingleArgCollection<I>,
V: PrimitiveResponse + DeserializeOwned,
R: KeyValueCollectionResponse<String, Vec<StreamEntry<V>>> { ... }
fn xreadgroup<G, C, K, KK, I, II, V, R>(
self,
group: G,
consumer: C,
options: XReadGroupOptions,
keys: KK,
ids: II
) -> PreparedCommand<'a, Self, R>
where Self: Sized,
G: SingleArg,
C: SingleArg,
K: SingleArg,
KK: SingleArgCollection<K>,
I: SingleArg,
II: SingleArgCollection<I>,
V: PrimitiveResponse + DeserializeOwned,
R: KeyValueCollectionResponse<String, Vec<StreamEntry<V>>> { ... }
fn xrevrange<K, E, S, V>(
self,
key: K,
end: E,
start: S,
count: Option<usize>
) -> PreparedCommand<'a, Self, Vec<StreamEntry<V>>>
where Self: Sized,
K: SingleArg,
E: SingleArg,
S: SingleArg,
V: PrimitiveResponse + DeserializeOwned { ... }
fn xtrim<K>(
self,
key: K,
options: XTrimOptions
) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg { ... }
}
Expand description
Provided Methods§
sourcefn xack<K, G, I, II>(
self,
key: K,
group: G,
ids: II
) -> PreparedCommand<'a, Self, usize>
fn xack<K, G, I, II>( self, key: K, group: G, ids: II ) -> PreparedCommand<'a, Self, usize>
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
) -> PreparedCommand<'a, Self, R>where
Self: Sized,
K: SingleArg,
I: SingleArg,
F: SingleArg,
V: SingleArg,
FFVV: KeyValueArgsCollection<F, V>,
R: PrimitiveResponse,
fn xadd<K, I, F, V, FFVV, R>(
self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions
) -> PreparedCommand<'a, Self, R>where
Self: Sized,
K: SingleArg,
I: SingleArg,
F: SingleArg,
V: SingleArg,
FFVV: KeyValueArgsCollection<F, V>,
R: PrimitiveResponse,
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
) -> PreparedCommand<'a, Self, XAutoClaimResult<V>>where
Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg,
I: SingleArg,
V: PrimitiveResponse + DeserializeOwned,
fn xautoclaim<K, G, C, I, V>(
self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions
) -> PreparedCommand<'a, Self, XAutoClaimResult<V>>where
Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg,
I: SingleArg,
V: PrimitiveResponse + DeserializeOwned,
sourcefn xclaim<K, G, C, I, II, V>(
self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> PreparedCommand<'a, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg,
I: SingleArg,
II: SingleArgCollection<I>,
V: PrimitiveResponse + DeserializeOwned,
fn xclaim<K, G, C, I, II, V>(
self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> PreparedCommand<'a, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: SingleArg,
G: SingleArg,
C: SingleArg,
I: SingleArg,
II: SingleArgCollection<I>,
V: PrimitiveResponse + DeserializeOwned,
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) -> PreparedCommand<'a, Self, usize>
fn xdel<K, I, II>(self, key: K, ids: II) -> PreparedCommand<'a, Self, usize>
sourcefn xgroup_create<K, G, I>(
self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions
) -> PreparedCommand<'a, Self, bool>
fn xgroup_create<K, G, I>( self, key: K, groupname: G, id: I, options: XGroupCreateOptions ) -> PreparedCommand<'a, Self, bool>
sourcefn xgroup_createconsumer<K, G, C>(
self,
key: K,
groupname: G,
consumername: C
) -> PreparedCommand<'a, Self, bool>
fn xgroup_createconsumer<K, G, C>( self, key: K, groupname: G, consumername: C ) -> PreparedCommand<'a, Self, bool>
sourcefn xgroup_delconsumer<K, G, C>(
self,
key: K,
groupname: G,
consumername: C
) -> PreparedCommand<'a, Self, usize>
fn xgroup_delconsumer<K, G, C>( self, key: K, groupname: G, consumername: C ) -> PreparedCommand<'a, Self, usize>
sourcefn xgroup_destroy<K, G>(
self,
key: K,
groupname: G
) -> PreparedCommand<'a, Self, bool>
fn xgroup_destroy<K, G>( self, key: K, groupname: G ) -> PreparedCommand<'a, Self, bool>
sourcefn xgroup_setid<K, G, I>(
self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>
) -> PreparedCommand<'a, Self, ()>
fn xgroup_setid<K, G, I>( self, key: K, groupname: G, id: I, entries_read: Option<usize> ) -> PreparedCommand<'a, Self, ()>
sourcefn xinfo_consumers<K, G>(
self,
key: K,
groupname: G
) -> PreparedCommand<'a, Self, Vec<XConsumerInfo>>
fn xinfo_consumers<K, G>( self, key: K, groupname: G ) -> PreparedCommand<'a, Self, Vec<XConsumerInfo>>
sourcefn xinfo_groups<K>(self, key: K) -> PreparedCommand<'a, Self, Vec<XGroupInfo>>
fn xinfo_groups<K>(self, key: K) -> PreparedCommand<'a, Self, Vec<XGroupInfo>>
sourcefn xinfo_stream<K>(
self,
key: K,
options: XInfoStreamOptions
) -> PreparedCommand<'a, Self, XStreamInfo>
fn xinfo_stream<K>( self, key: K, options: XInfoStreamOptions ) -> PreparedCommand<'a, Self, XStreamInfo>
sourcefn xlen<K>(self, key: K) -> PreparedCommand<'a, Self, usize>
fn xlen<K>(self, key: K) -> PreparedCommand<'a, Self, usize>
sourcefn xpending<K, G>(
self,
key: K,
group: G
) -> PreparedCommand<'a, Self, XPendingResult>
fn xpending<K, G>( self, key: K, group: G ) -> PreparedCommand<'a, Self, XPendingResult>
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
) -> PreparedCommand<'a, Self, Vec<XPendingMessageResult>>
fn xpending_with_options<K, G>( self, key: K, group: G, options: XPendingOptions ) -> PreparedCommand<'a, Self, Vec<XPendingMessageResult>>
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>
) -> PreparedCommand<'a, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: SingleArg,
S: SingleArg,
E: SingleArg,
V: PrimitiveResponse + DeserializeOwned,
fn xrange<K, S, E, V>(
self,
key: K,
start: S,
end: E,
count: Option<usize>
) -> PreparedCommand<'a, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: SingleArg,
S: SingleArg,
E: SingleArg,
V: PrimitiveResponse + DeserializeOwned,
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.