pub struct Form<T>(pub T);
Expand description
An extractor that can deserialize some type from query string or body.
If the method is not GET
, the query parameters will be parsed from the
body, otherwise it is like Query
.
If the Content-Type
is not application/x-www-form-urlencoded
, then a
Bad Request
response will be returned.
Errors
Example
use poem::{
get, handler,
http::{Method, StatusCode, Uri},
test::TestClient,
web::Form,
Endpoint, Request, Route,
};
use serde::Deserialize;
#[derive(Deserialize)]
struct CreateDocument {
title: String,
content: String,
}
#[handler]
fn index(Form(CreateDocument { title, content }): Form<CreateDocument>) -> String {
format!("{}:{}", title, content)
}
let app = Route::new().at("/", get(index).post(index));
let cli = TestClient::new(app);
let resp = cli
.get("/")
.query("title", &"foo")
.query("content", &"bar")
.send()
.await;
resp.assert_status_is_ok();
resp.assert_text("foo:bar").await;
let resp = cli
.post("/")
.form(&[("title", "foo"), ("content", "bar")])
.send()
.await;
resp.assert_status_is_ok();
resp.assert_text("foo:bar").await;
Tuple Fields
0: T
Trait Implementations
sourceimpl<'a, T: DeserializeOwned> FromRequest<'a> for Form<T>
impl<'a, T: DeserializeOwned> FromRequest<'a> for Form<T>
sourcefn from_request<'life0, 'async_trait>(
req: &'a Request,
body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'a Request,
body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Extract from request head and body.
Auto Trait Implementations
impl<T> RefUnwindSafe for Form<T>where
T: RefUnwindSafe,
impl<T> Send for Form<T>where
T: Send,
impl<T> Sync for Form<T>where
T: Sync,
impl<T> Unpin for Form<T>where
T: Unpin,
impl<T> UnwindSafe for Form<T>where
T: UnwindSafe,
Blanket Implementations
impl<T, A, P> Access<T> for Pwhere
A: Access<T>,
P: Deref<Target = A>,
impl<T, A, P> Access<T> for Pwhere
A: Access<T>,
P: Deref<Target = A>,
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Commands for Twhere
T: ConnectionLike,
impl<T> Commands for Twhere
T: ConnectionLike,
sourcefn get<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn get<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the value of a key. If key is a vec this becomes an
MGET
.sourcefn keys<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn keys<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all keys matching pattern
sourcefn set<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the string value of a key.
sourcefn set_multiple<K, V, RV, 'a>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set_multiple<K, V, RV, 'a>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets multiple keys to their values.
sourcefn set_ex<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
seconds: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set_ex<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
seconds: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the value and expiration of a key.
sourcefn pset_ex<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
milliseconds: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn pset_ex<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
milliseconds: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the value and expiration in milliseconds of a key.
sourcefn set_nx<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set_nx<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the value of a key, only if the key does not exist
sourcefn mset_nx<K, V, RV, 'a>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn mset_nx<K, V, RV, 'a>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets multiple keys to their values failing if at least one already exists.
sourcefn getset<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn getset<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the string value of a key and return its old value.
sourcefn getrange<K, RV, 'a>(
&mut self,
key: K,
from: isize,
to: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn getrange<K, RV, 'a>(
&mut self,
key: K,
from: isize,
to: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value.
sourcefn setrange<K, V, RV, 'a>(
&mut self,
key: K,
offset: isize,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn setrange<K, V, RV, 'a>(
&mut self,
key: K,
offset: isize,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Overwrite the part of the value stored in key at the specified offset.
sourcefn del<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn del<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Delete one or more keys.
sourcefn exists<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn exists<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Determine if a key exists.
sourcefn expire<K, RV, 'a>(&mut self, key: K, seconds: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn expire<K, RV, 'a>(&mut self, key: K, seconds: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Set a key’s time to live in seconds.
sourcefn expire_at<K, RV, 'a>(&mut self, key: K, ts: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn expire_at<K, RV, 'a>(&mut self, key: K, ts: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Set the expiration for a key as a UNIX timestamp.
sourcefn pexpire<K, RV, 'a>(&mut self, key: K, ms: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pexpire<K, RV, 'a>(&mut self, key: K, ms: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Set a key’s time to live in milliseconds.
sourcefn pexpire_at<K, RV, 'a>(&mut self, key: K, ts: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pexpire_at<K, RV, 'a>(&mut self, key: K, ts: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Set the expiration for a key as a UNIX timestamp in milliseconds.
sourcefn persist<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn persist<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Remove the expiration from a key.
sourcefn ttl<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn ttl<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the expiration time of a key.
sourcefn pttl<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pttl<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the expiration time of a key in milliseconds.
sourcefn get_ex<K, RV, 'a>(
&mut self,
key: K,
expire_at: Expiry
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn get_ex<K, RV, 'a>(
&mut self,
key: K,
expire_at: Expiry
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the value of a key and set expiration
sourcefn get_del<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn get_del<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the value of a key and delete it
sourcefn rename<K, RV, 'a>(&mut self, key: K, new_key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rename<K, RV, 'a>(&mut self, key: K, new_key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Rename a key.
sourcefn rename_nx<K, RV, 'a>(&mut self, key: K, new_key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rename_nx<K, RV, 'a>(&mut self, key: K, new_key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Rename a key, only if the new key does not exist.
sourcefn unlink<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn unlink<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Unlink one or more keys.
sourcefn append<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn append<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Append a value to a key.
sourcefn incr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn incr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Increment the numeric value of a key by the given amount. This
issues a
INCRBY
or INCRBYFLOAT
depending on the type. Read moresourcefn decr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn decr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Decrement the numeric value of a key by the given amount.
sourcefn setbit<K, RV, 'a>(
&mut self,
key: K,
offset: usize,
value: bool
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn setbit<K, RV, 'a>(
&mut self,
key: K,
offset: usize,
value: bool
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Sets or clears the bit at offset in the string value stored at key.
sourcefn getbit<K, RV, 'a>(&mut self, key: K, offset: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn getbit<K, RV, 'a>(&mut self, key: K, offset: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the bit value at offset in the string value stored at key.
sourcefn bitcount<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bitcount<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Count set bits in a string.
sourcefn bitcount_range<K, RV, 'a>(
&mut self,
key: K,
start: usize,
end: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bitcount_range<K, RV, 'a>(
&mut self,
key: K,
start: usize,
end: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Count set bits in a string in a range.
sourcefn bit_and<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_and<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise AND between multiple keys (containing string values)
and store the result in the destination key. Read more
sourcefn bit_or<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_or<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise OR between multiple keys (containing string values)
and store the result in the destination key. Read more
sourcefn bit_xor<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_xor<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise XOR between multiple keys (containing string values)
and store the result in the destination key. Read more
sourcefn bit_not<K, RV, 'a>(&mut self, dstkey: K, srckey: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_not<K, RV, 'a>(&mut self, dstkey: K, srckey: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise NOT of the key (containing string values)
and store the result in the destination key. Read more
sourcefn strlen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn strlen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the length of the value stored in a key.
sourcefn hget<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
fn hget<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
Gets a single (or multiple) fields from a hash.
sourcefn hdel<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
fn hdel<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
Deletes a single (or multiple) fields from a hash.
sourcefn hset<K, F, V, RV, 'a>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn hset<K, F, V, RV, 'a>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets a single field in a hash.
sourcefn hset_nx<K, F, V, RV, 'a>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn hset_nx<K, F, V, RV, 'a>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets a single field in a hash if it does not exist.
sourcefn hset_multiple<K, F, V, RV, 'a>(
&mut self,
key: K,
items: &'a [(F, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn hset_multiple<K, F, V, RV, 'a>(
&mut self,
key: K,
items: &'a [(F, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets a multiple fields in a hash.
sourcefn hincr<K, F, D, RV, 'a>(
&mut self,
key: K,
field: F,
delta: D
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
fn hincr<K, F, D, RV, 'a>(
&mut self,
key: K,
field: F,
delta: D
) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
Increments a value.
sourcefn hexists<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
fn hexists<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
Checks if a field in a hash exists.
sourcefn hkeys<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hkeys<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the keys in a hash.
sourcefn hvals<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hvals<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the values in a hash.
sourcefn hgetall<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hgetall<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the fields and values in a hash.
sourcefn hlen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hlen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets the length of a hash.
sourcefn blmove<K, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction,
timeout: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn blmove<K, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction,
timeout: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Pop an element from a list, push it to another list
and return it; or block until one is available Read more
sourcefn blmpop<K, RV, 'a>(
&mut self,
timeout: usize,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn blmpop<K, RV, 'a>(
&mut self,
timeout: usize,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Pops
count
elements from the first non-empty list key from the list of
provided key names; or blocks until one is available. Read moresourcefn blpop<K, RV, 'a>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn blpop<K, RV, 'a>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Remove and get the first element in a list, or block until one is available.
sourcefn brpop<K, RV, 'a>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn brpop<K, RV, 'a>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Remove and get the last element in a list, or block until one is available.
sourcefn brpoplpush<K, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
timeout: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn brpoplpush<K, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
timeout: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Pop a value from a list, push it to another list and return it;
or block until one is available. Read more
sourcefn lindex<K, RV, 'a>(&mut self, key: K, index: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lindex<K, RV, 'a>(&mut self, key: K, index: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get an element from a list by its index.
sourcefn linsert_before<K, P, V, RV, 'a>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn linsert_before<K, P, V, RV, 'a>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert an element before another element in a list.
sourcefn linsert_after<K, P, V, RV, 'a>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn linsert_after<K, P, V, RV, 'a>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert an element after another element in a list.
sourcefn llen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn llen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the length of the list stored at key.
sourcefn lmove<K, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lmove<K, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Pop an element a list, push it to another list and return it
sourcefn lmpop<K, RV, 'a>(
&mut self,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lmpop<K, RV, 'a>(
&mut self,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Pops
count
elements from the first non-empty list key from the list of
provided key names. Read moresourcefn lpop<K, RV, 'a>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lpop<K, RV, 'a>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns the up to
count
first elements of the list stored at key. Read moresourcefn lpos<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
options: LposOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lpos<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
options: LposOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Returns the index of the first matching value of the list stored at key.
sourcefn lpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert all the specified values at the head of the list stored at key.
sourcefn lpush_exists<K, V, RV, 'a>(
&mut self,
key: K,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lpush_exists<K, V, RV, 'a>(
&mut self,
key: K,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Inserts a value at the head of the list stored at key, only if key
already exists and holds a list. Read more
sourcefn lrange<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lrange<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the specified elements of the list stored at key.
sourcefn lrem<K, V, RV, 'a>(
&mut self,
key: K,
count: isize,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lrem<K, V, RV, 'a>(
&mut self,
key: K,
count: isize,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Removes the first count occurrences of elements equal to value
from the list stored at key. Read more
sourcefn ltrim<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn ltrim<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Trim an existing list so that it will contain only the specified
range of elements specified. Read more
sourcefn lset<K, V, RV, 'a>(
&mut self,
key: K,
index: isize,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lset<K, V, RV, 'a>(
&mut self,
key: K,
index: isize,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets the list element at index to value
sourcefn rpop<K, RV, 'a>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rpop<K, RV, 'a>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns the up to
count
last elements of the list stored at key Read moresourcefn rpoplpush<K, RV, 'a>(&mut self, key: K, dstkey: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rpoplpush<K, RV, 'a>(&mut self, key: K, dstkey: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Pop a value from a list, push it to another list and return it.
sourcefn rpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn rpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert all the specified values at the tail of the list stored at key.
sourcefn rpush_exists<K, V, RV, 'a>(
&mut self,
key: K,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn rpush_exists<K, V, RV, 'a>(
&mut self,
key: K,
value: V
) -> Result<RV, RedisError>where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Inserts value at the tail of the list stored at key, only if key
already exists and holds a list. Read more
sourcefn sadd<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn sadd<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Add one or more members to a set.
sourcefn scard<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn scard<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the number of members in a set.
sourcefn sdiff<K, RV, 'a>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sdiff<K, RV, 'a>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Subtract multiple sets.
sourcefn sdiffstore<K, RV, 'a>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sdiffstore<K, RV, 'a>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Subtract multiple sets and store the resulting set in a key.
sourcefn sinter<K, RV, 'a>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sinter<K, RV, 'a>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sets.
sourcefn sinterstore<K, RV, 'a>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sinterstore<K, RV, 'a>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sets and store the resulting set in a key.
sourcefn sismember<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn sismember<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Determine if a given value is a member of a set.
sourcefn smembers<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn smembers<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get all the members in a set.
sourcefn smove<K, M, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
member: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn smove<K, M, RV, 'a>(
&mut self,
srckey: K,
dstkey: K,
member: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Move a member from one set to another.
sourcefn spop<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn spop<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Remove and return a random member from a set.
sourcefn srandmember<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn srandmember<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get one random member from a set.
sourcefn srandmember_multiple<K, RV, 'a>(
&mut self,
key: K,
count: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn srandmember_multiple<K, RV, 'a>(
&mut self,
key: K,
count: usize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get multiple random members from a set.
sourcefn srem<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn srem<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Remove one or more members from a set.
sourcefn sunion<K, RV, 'a>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sunion<K, RV, 'a>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Add multiple sets.
sourcefn sunionstore<K, RV, 'a>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sunionstore<K, RV, 'a>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Add multiple sets and store the resulting set in a key.
sourcefn zadd<K, S, M, RV, 'a>(
&mut self,
key: K,
member: M,
score: S
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zadd<K, S, M, RV, 'a>(
&mut self,
key: K,
member: M,
score: S
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Add one member to a sorted set, or update its score if it already exists.
sourcefn zadd_multiple<K, S, M, RV, 'a>(
&mut self,
key: K,
items: &'a [(S, M)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zadd_multiple<K, S, M, RV, 'a>(
&mut self,
key: K,
items: &'a [(S, M)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Add multiple members to a sorted set, or update its score if it already exists.
sourcefn zcard<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zcard<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the number of members in a sorted set.
sourcefn zcount<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zcount<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Count the members in a sorted set with scores within the given values.
sourcefn zincr<K, M, D, RV, 'a>(
&mut self,
key: K,
member: M,
delta: D
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
fn zincr<K, M, D, RV, 'a>(
&mut self,
key: K,
member: M,
delta: D
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
Increments the member in a sorted set at key by delta.
If the member does not exist, it is added with delta as its score. Read more
sourcefn zinterstore<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sorted sets and store the resulting sorted set in
a new key using SUM as aggregation function. Read more
sourcefn zinterstore_min<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_min<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sorted sets and store the resulting sorted set in
a new key using MIN as aggregation function. Read more
sourcefn zinterstore_max<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_max<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sorted sets and store the resulting sorted set in
a new key using MAX as aggregation function. Read more
sourcefn zinterstore_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
Commands::zinterstore
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple. Read moresourcefn zinterstore_min_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_min_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
Commands::zinterstore_min
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple. Read moresourcefn zinterstore_max_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_max_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
Commands::zinterstore_max
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple. Read moresourcefn zlexcount<K, L, RV, 'a>(
&mut self,
key: K,
min: L,
max: L
) -> Result<RV, RedisError>where
K: ToRedisArgs,
L: ToRedisArgs,
RV: FromRedisValue,
fn zlexcount<K, L, RV, 'a>(
&mut self,
key: K,
min: L,
max: L
) -> Result<RV, RedisError>where
K: ToRedisArgs,
L: ToRedisArgs,
RV: FromRedisValue,
Count the number of members in a sorted set between a given lexicographical range.
sourcefn zpopmax<K, RV, 'a>(&mut self, key: K, count: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zpopmax<K, RV, 'a>(&mut self, key: K, count: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns up to count members with the highest scores in a sorted set
sourcefn zpopmin<K, RV, 'a>(&mut self, key: K, count: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zpopmin<K, RV, 'a>(&mut self, key: K, count: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns up to count members with the lowest scores in a sorted set
sourcefn zmpop_max<K, RV, 'a>(
&mut self,
keys: &'a [K],
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zmpop_max<K, RV, 'a>(
&mut self,
keys: &'a [K],
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns up to count members with the highest scores,
from the first non-empty sorted set in the provided list of key names. Read more
sourcefn zmpop_min<K, RV, 'a>(
&mut self,
keys: &'a [K],
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zmpop_min<K, RV, 'a>(
&mut self,
keys: &'a [K],
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns up to count members with the lowest scores,
from the first non-empty sorted set in the provided list of key names. Read more
sourcefn zrandmember<K, RV, 'a>(
&mut self,
key: K,
count: Option<isize>
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrandmember<K, RV, 'a>(
&mut self,
key: K,
count: Option<isize>
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Return up to count random members in a sorted set (or 1 if
count == None
)sourcefn zrandmember_withscores<K, RV, 'a>(
&mut self,
key: K,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrandmember_withscores<K, RV, 'a>(
&mut self,
key: K,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Return up to count random members in a sorted set with scores
sourcefn zrange<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrange<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index
sourcefn zrange_withscores<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrange_withscores<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index with scores.
sourcefn zrangebylex<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebylex<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical range.
sourcefn zrangebylex_limit<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebylex_limit<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical
range with offset and limit. Read more
sourcefn zrevrangebylex<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebylex<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical range.
sourcefn zrevrangebylex_limit<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebylex_limit<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical
range with offset and limit. Read more
sourcefn zrangebyscore<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score.
sourcefn zrangebyscore_withscores<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore_withscores<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with scores.
sourcefn zrangebyscore_limit<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore_limit<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit.
sourcefn zrangebyscore_limit_withscores<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore_limit_withscores<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit with scores.
sourcefn zrank<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrank<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Determine the index of a member in a sorted set.
sourcefn zrem<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrem<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Remove one or more members from a sorted set.
sourcefn zrembylex<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrembylex<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Remove all members in a sorted set between the given lexicographical range.
sourcefn zremrangebyrank<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zremrangebyrank<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Remove all members in a sorted set within the given indexes.
sourcefn zrembyscore<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrembyscore<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Remove all members in a sorted set within the given scores.
sourcefn zrevrange<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrevrange<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index, with scores
ordered from high to low. Read more
sourcefn zrevrange_withscores<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrevrange_withscores<K, RV, 'a>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index, with scores
ordered from high to low. Read more
sourcefn zrevrangebyscore<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score.
sourcefn zrevrangebyscore_withscores<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore_withscores<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with scores.
sourcefn zrevrangebyscore_limit<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore_limit<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit.
sourcefn zrevrangebyscore_limit_withscores<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore_limit_withscores<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit with scores.
sourcefn zrevrank<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrank<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Determine the index of a member in a sorted set, with scores ordered from high to low.
sourcefn zscore<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zscore<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Get the score associated with the given member in a sorted set.
sourcefn zscore_multiple<K, M, RV, 'a>(
&mut self,
key: K,
members: &'a [M]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zscore_multiple<K, M, RV, 'a>(
&mut self,
key: K,
members: &'a [M]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Get the scores associated with multiple members in a sorted set.
sourcefn zunionstore<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Unions multiple sorted sets and store the resulting sorted set in
a new key using SUM as aggregation function. Read more
sourcefn zunionstore_min<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_min<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Unions multiple sorted sets and store the resulting sorted set in
a new key using MIN as aggregation function. Read more
sourcefn zunionstore_max<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_max<K, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Unions multiple sorted sets and store the resulting sorted set in
a new key using MAX as aggregation function. Read more
sourcefn zunionstore_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
Commands::zunionstore
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple. Read moresourcefn zunionstore_min_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_min_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
Commands::zunionstore_min
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple. Read moresourcefn zunionstore_max_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_max_weights<K, W, RV, 'a>(
&mut self,
dstkey: K,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
W: ToRedisArgs,
RV: FromRedisValue,
Commands::zunionstore_max
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple. Read moresourcefn pfadd<K, E, RV, 'a>(&mut self, key: K, element: E) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
fn pfadd<K, E, RV, 'a>(&mut self, key: K, element: E) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
Adds the specified elements to the specified HyperLogLog.
sourcefn pfcount<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pfcount<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Return the approximated cardinality of the set(s) observed by the
HyperLogLog at key(s). Read more
sourcefn pfmerge<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pfmerge<K, RV, 'a>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Merge N different HyperLogLogs into a single one.
sourcefn publish<K, E, RV, 'a>(
&mut self,
channel: K,
message: E
) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
fn publish<K, E, RV, 'a>(
&mut self,
channel: K,
message: E
) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
Posts a message to the given channel.
sourcefn object_encoding<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn object_encoding<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the encoding of a key.
sourcefn object_idletime<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn object_idletime<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the time in seconds since the last access of a key.
sourcefn object_freq<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn object_freq<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the logarithmic access frequency counter of a key.
sourcefn object_refcount<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn object_refcount<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the reference count of a key.
sourcefn acl_load<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_load<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
When Redis is configured to use an ACL file (with the aclfile
configuration option), this command will reload the ACLs from the file,
replacing all the current ACL rules with the ones defined in the file. Read more
sourcefn acl_save<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_save<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
When Redis is configured to use an ACL file (with the aclfile
configuration option), this command will save the currently defined
ACLs from the server memory to the ACL file. Read more
sourcefn acl_list<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_list<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Shows the currently active ACL rules in the Redis server.
sourcefn acl_users<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_users<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Shows a list of all the usernames of the currently configured users in
the Redis ACL system. Read more
sourcefn acl_getuser<K, RV, 'a>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_getuser<K, RV, 'a>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns all the rules defined for an existing ACL user.
sourcefn acl_setuser<K, RV, 'a>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_setuser<K, RV, 'a>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Creates an ACL user without any privilege.
sourcefn acl_setuser_rules<K, RV, 'a>(
&mut self,
username: K,
rules: &'a [Rule]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_setuser_rules<K, RV, 'a>(
&mut self,
username: K,
rules: &'a [Rule]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Creates an ACL user with the specified rules or modify the rules of
an existing user. Read more
sourcefn acl_deluser<K, RV, 'a>(
&mut self,
usernames: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_deluser<K, RV, 'a>(
&mut self,
usernames: &'a [K]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Delete all the specified ACL users and terminate all the connections
that are authenticated with such users. Read more
sourcefn acl_cat<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_cat<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Shows the available ACL categories.
sourcefn acl_cat_categoryname<K, RV, 'a>(
&mut self,
categoryname: K
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_cat_categoryname<K, RV, 'a>(
&mut self,
categoryname: K
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Shows all the Redis commands in the specified category.
sourcefn acl_genpass<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_genpass<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Generates a 256-bits password starting from /dev/urandom if available.
sourcefn acl_genpass_bits<RV, 'a>(&mut self, bits: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_genpass_bits<RV, 'a>(&mut self, bits: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
Generates a 1-to-1024-bits password starting from /dev/urandom if available.
sourcefn acl_whoami<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_whoami<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Returns the username the current connection is authenticated with.
sourcefn acl_log<RV, 'a>(&mut self, count: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_log<RV, 'a>(&mut self, count: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
Shows a list of recent ACL security events
sourcefn acl_log_reset<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_log_reset<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Clears the ACL log.
sourcefn acl_help<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_help<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Returns a helpful text describing the different subcommands.
sourcefn geo_add<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_add<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Adds the specified geospatial items to the specified key. Read more
sourcefn geo_dist<K, M1, M2, RV, 'a>(
&mut self,
key: K,
member1: M1,
member2: M2,
unit: Unit
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M1: ToRedisArgs,
M2: ToRedisArgs,
RV: FromRedisValue,
fn geo_dist<K, M1, M2, RV, 'a>(
&mut self,
key: K,
member1: M1,
member2: M2,
unit: Unit
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M1: ToRedisArgs,
M2: ToRedisArgs,
RV: FromRedisValue,
Return the distance between two members in the geospatial index
represented by the sorted set. Read more
sourcefn geo_hash<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_hash<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
sourcefn geo_pos<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_pos<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return the positions of all the specified members of the geospatial
index represented by the sorted set at key. Read more
sourcefn geo_radius<K, RV, 'a>(
&mut self,
key: K,
longitude: f64,
latitude: f64,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn geo_radius<K, RV, 'a>(
&mut self,
key: K,
longitude: f64,
latitude: f64,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
sourcefn geo_radius_by_member<K, M, RV, 'a>(
&mut self,
key: K,
member: M,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_radius_by_member<K, M, RV, 'a>(
&mut self,
key: K,
member: M,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Retrieve members selected by distance with the center of
member
. The
member itself is always contained in the results. Read moresourcefn xack<K, G, I, RV, 'a>(
&mut self,
key: K,
group: G,
ids: &'a [I]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
I: ToRedisArgs,
RV: FromRedisValue,
fn xack<K, G, I, RV, 'a>(
&mut self,
key: K,
group: G,
ids: &'a [I]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
I: ToRedisArgs,
RV: FromRedisValue,
Ack pending stream messages checked out by a consumer. Read more
sourcefn xadd<K, ID, F, V, RV, 'a>(
&mut self,
key: K,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn xadd<K, ID, F, V, RV, 'a>(
&mut self,
key: K,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
sourcefn xadd_map<K, ID, BTM, RV, 'a>(
&mut self,
key: K,
id: ID,
map: BTM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
fn xadd_map<K, ID, BTM, RV, 'a>(
&mut self,
key: K,
id: ID,
map: BTM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
BTreeMap variant for adding a stream message by
key
.
Use *
as the id
for the current timestamp. Read moresourcefn xadd_maxlen<K, ID, F, V, RV, 'a>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn xadd_maxlen<K, ID, F, V, RV, 'a>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Add a stream message while capping the stream at a maxlength. Read more
sourcefn xadd_maxlen_map<K, ID, BTM, RV, 'a>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
map: BTM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
fn xadd_maxlen_map<K, ID, BTM, RV, 'a>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
map: BTM
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
BTreeMap variant for adding a stream message while capping the stream at a maxlength. Read more
sourcefn xclaim<K, G, C, MIT, ID, RV, 'a>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xclaim<K, G, C, MIT, ID, RV, 'a>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
Claim pending, unacked messages, after some period of time,
currently checked out by another consumer. Read more
sourcefn xclaim_options<K, G, C, MIT, ID, RV, 'a>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID],
options: StreamClaimOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xclaim_options<K, G, C, MIT, ID, RV, 'a>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID],
options: StreamClaimOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
This is the optional arguments version for claiming unacked, pending messages
currently checked out by another consumer. Read more
sourcefn xdel<K, ID, RV, 'a>(&mut self, key: K, ids: &'a [ID]) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xdel<K, ID, RV, 'a>(&mut self, key: K, ids: &'a [ID]) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
sourcefn xgroup_create<K, G, ID, RV, 'a>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_create<K, G, ID, RV, 'a>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
This command is used for creating a consumer
group
. It expects the stream key
to already exist. Otherwise, use xgroup_create_mkstream
if it doesn’t.
The id
is the starting message id all consumers should read from. Use $
If you want
all consumers to read from the last message added to stream. Read moresourcefn xgroup_create_mkstream<K, G, ID, RV, 'a>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_create_mkstream<K, G, ID, RV, 'a>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
This is the alternate version for creating a consumer
group
which makes the stream if it doesn’t exist. Read moresourcefn xgroup_setid<K, G, ID, RV, 'a>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_setid<K, G, ID, RV, 'a>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
sourcefn xgroup_destroy<K, G, RV, 'a>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_destroy<K, G, RV, 'a>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
sourcefn xgroup_delconsumer<K, G, C, RV, 'a>(
&mut self,
key: K,
group: G,
consumer: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_delconsumer<K, G, C, RV, 'a>(
&mut self,
key: K,
group: G,
consumer: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
sourcefn xinfo_consumers<K, G, RV, 'a>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_consumers<K, G, RV, 'a>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
This returns all info details about
which consumers have read messages for given consumer
group
.
Take note of the StreamInfoConsumersReply return type. Read moresourcefn xinfo_groups<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_groups<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns all consumer
group
s created for a given stream key
.
Take note of the StreamInfoGroupsReply return type. Read moresourcefn xinfo_stream<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_stream<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns info about high-level stream details
(first & last message
id
, length, number of groups, etc.)
Take note of the StreamInfoStreamReply return type. Read moresourcefn xlen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xlen<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the number of messages for a given stream
key
. Read moresourcefn xpending<K, G, RV, 'a>(&mut self, key: K, group: G) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
fn xpending<K, G, RV, 'a>(&mut self, key: K, group: G) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
This is a basic version of making XPENDING command calls which only
passes a stream
key
and consumer group
and it
returns details about which consumers have pending messages
that haven’t been acked. Read moresourcefn xpending_count<K, G, S, E, C, RV, 'a>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xpending_count<K, G, S, E, C, RV, 'a>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
This XPENDING version returns a list of all messages over the range.
You can use this for paginating pending messages (but without the message HashMap). Read more
sourcefn xpending_consumer_count<K, G, S, E, C, CN, RV, 'a>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C,
consumer: CN
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
CN: ToRedisArgs,
RV: FromRedisValue,
fn xpending_consumer_count<K, G, S, E, C, CN, RV, 'a>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C,
consumer: CN
) -> Result<RV, RedisError>where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
CN: ToRedisArgs,
RV: FromRedisValue,
sourcefn xrange<K, S, E, RV, 'a>(
&mut self,
key: K,
start: S,
end: E
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
fn xrange<K, S, E, RV, 'a>(
&mut self,
key: K,
start: S,
end: E
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
Returns a range of messages in a given stream
key
. Read moresourcefn xrange_all<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xrange_all<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
A helper method for automatically returning all messages in a stream by
key
.
Use with caution! Read moresourcefn xrange_count<K, S, E, C, RV, 'a>(
&mut self,
key: K,
start: S,
end: E,
count: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xrange_count<K, S, E, C, RV, 'a>(
&mut self,
key: K,
start: S,
end: E,
count: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
A method for paginating a stream by
key
. Read moresourcefn xread<K, ID, RV, 'a>(
&mut self,
keys: &'a [K],
ids: &'a [ID]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xread<K, ID, RV, 'a>(
&mut self,
keys: &'a [K],
ids: &'a [ID]
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
Read a list of
id
s for each stream key
.
This is the basic form of reading streams.
For more advanced control, like blocking, limiting, or reading by consumer group
,
see xread_options
. Read moresourcefn xread_options<K, ID, RV, 'a>(
&mut self,
keys: &'a [K],
ids: &'a [ID],
options: &'a StreamReadOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xread_options<K, ID, RV, 'a>(
&mut self,
keys: &'a [K],
ids: &'a [ID],
options: &'a StreamReadOptions
) -> Result<RV, RedisError>where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
sourcefn xrevrange<K, E, S, RV, 'a>(
&mut self,
key: K,
end: E,
start: S
) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
RV: FromRedisValue,
fn xrevrange<K, E, S, RV, 'a>(
&mut self,
key: K,
end: E,
start: S
) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
RV: FromRedisValue,
sourcefn xrevrange_all<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xrevrange_all<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
sourcefn xrevrange_count<K, E, S, C, RV, 'a>(
&mut self,
key: K,
end: E,
start: S,
count: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xrevrange_count<K, E, S, C, RV, 'a>(
&mut self,
key: K,
end: E,
start: S,
count: C
) -> Result<RV, RedisError>where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
sourcefn xtrim<K, RV, 'a>(
&mut self,
key: K,
maxlen: StreamMaxlen
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xtrim<K, RV, 'a>(
&mut self,
key: K,
maxlen: StreamMaxlen
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Trim a stream
key
to a MAXLEN count. Read moresourcefn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError>where
RV: FromRedisValue,
fn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError>where
RV: FromRedisValue,
Incrementally iterate the keys space.
sourcefn scan_match<P, RV>(&mut self, pattern: P) -> Result<Iter<'_, RV>, RedisError>where
P: ToRedisArgs,
RV: FromRedisValue,
fn scan_match<P, RV>(&mut self, pattern: P) -> Result<Iter<'_, RV>, RedisError>where
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate the keys space for keys matching a pattern.
sourcefn hscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate hash fields and associated values.
sourcefn hscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
fn hscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate hash fields and associated values for
field names matching a pattern. Read more
sourcefn sscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate set elements.
sourcefn sscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
fn sscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate set elements for elements matching a pattern.
sourcefn zscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate sorted set elements.
sourcefn zscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
fn zscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate sorted set elements for elements matching a pattern.
sourceimpl<C, T> ConnectionLike for Twhere
C: ConnectionLike,
T: DerefMut<Target = C>,
impl<C, T> ConnectionLike for Twhere
C: ConnectionLike,
T: DerefMut<Target = C>,
sourcefn req_packed_command(&mut self, cmd: &[u8]) -> Result<Value, RedisError>
fn req_packed_command(&mut self, cmd: &[u8]) -> Result<Value, RedisError>
Sends an already encoded (packed) command into the TCP socket and
reads the single response from it. Read more
sourcefn req_packed_commands(
&mut self,
cmd: &[u8],
offset: usize,
count: usize
) -> Result<Vec<Value, Global>, RedisError>
fn req_packed_commands(
&mut self,
cmd: &[u8],
offset: usize,
count: usize
) -> Result<Vec<Value, Global>, RedisError>
Sends multiple already encoded (packed) command into the TCP socket
and reads
count
responses from it. This is used to implement
pipelining. Read moresourcefn req_command(&mut self, cmd: &Cmd) -> Result<Value, RedisError>
fn req_command(&mut self, cmd: &Cmd) -> Result<Value, RedisError>
Sends a Cmd into the TCP socket and reads a single response from it.
sourcefn get_db(&self) -> i64
fn get_db(&self) -> i64
Returns the database this connection is bound to. Note that this
information might be unreliable because it’s initially cached and
also might be incorrect if the connection like object is not
actually connected. Read more
fn supports_pipelining(&self) -> bool
sourcefn check_connection(&mut self) -> bool
fn check_connection(&mut self) -> bool
Check that all connections it has are available (
PING
internally).impl<T, A> DynAccess<T> for Awhere
A: Access<T>,
<A as Access<T>>::Guard: 'static,
impl<T, A> DynAccess<T> for Awhere
A: Access<T>,
<A as Access<T>>::Guard: 'static,
fn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
The equivalent of [
Access::load
].