Struct ncryptf::Connection
source · pub struct Connection<D>(/* private fields */)
where
D: Database;
Expand description
A request guard which retrieves a single connection to a Database
.
For a database type of Db
, a request guard of Connection<Db>
retrieves a
single connection to Db
.
The request guard succeeds if the database was initialized by the
Initializer
fairing and a connection is available within
connect_timeout
seconds.
- If the
Initializer
fairing was not attached, the guard fails with statusInternalServerError
. ASentinel
guards this condition, and so this type of error is unlikely to occur. ANone
error is returned. - If a connection is not available within
connect_timeout
seconds or another error occurs, the guard fails with statusServiceUnavailable
and the error is returned inSome
.
Deref
A type of Connection<Db>
dereferences, mutably and immutably, to the
native database connection type. The driver table
lists the concrete native Deref
types.
Example
use rocket_db_pools::{Database, Connection};
#[derive(Database)]
#[database("db")]
struct Db(Pool);
#[get("/")]
async fn db_op(db: Connection<Db>) {
// use `&*db` to get an immutable borrow to the native connection type
// use `&mut *db` to get a mutable borrow to the native connection type
}
Implementations§
source§impl<D> Connection<D>where
D: Database,
impl<D> Connection<D>where
D: Database,
sourcepub fn into_inner(self) -> <<D as Database>::Pool as Pool>::Connection
pub fn into_inner(self) -> <<D as Database>::Pool as Pool>::Connection
Returns the internal connection value. See the Connection
Deref
column for the expected type of this value.
Note that Connection<D>
derefs to the internal connection type, so
using this method is likely unnecessary. See deref
for examples.
Example
use rocket_db_pools::{Database, Connection};
#[derive(Database)]
#[database("db")]
struct Db(Pool);
#[get("/")]
async fn db_op(db: Connection<Db>) {
let inner = db.into_inner();
}
Trait Implementations§
source§impl<D> Deref for Connection<D>where
D: Database,
impl<D> Deref for Connection<D>where
D: Database,
source§impl<D> DerefMut for Connection<D>where
D: Database,
impl<D> DerefMut for Connection<D>where
D: Database,
source§impl<'r, D> FromRequest<'r> for Connection<D>where
D: Database,
impl<'r, D> FromRequest<'r> for Connection<D>where
D: Database,
§type Error = Option<<<D as Database>::Pool as Pool>::Error>
type Error = Option<<<D as Database>::Pool as Pool>::Error>
source§fn from_request<'life0, 'async_trait>(
req: &'r Request<'life0>
) -> Pin<Box<dyn Future<Output = Outcome<Connection<D>, (Status, <Connection<D> as FromRequest<'r>>::Error), Status>> + Send + 'async_trait>>where
'r: 'async_trait,
'life0: 'async_trait,
Connection<D>: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'r Request<'life0>
) -> Pin<Box<dyn Future<Output = Outcome<Connection<D>, (Status, <Connection<D> as FromRequest<'r>>::Error), Status>> + Send + 'async_trait>>where
'r: 'async_trait,
'life0: 'async_trait,
Connection<D>: 'async_trait,
Self
from the incoming request metadata. Read moreAuto Trait Implementations§
impl<D> RefUnwindSafe for Connection<D>
impl<D> Send for Connection<D>
impl<D> Sync for Connection<D>
impl<D> Unpin for Connection<D>
impl<D> UnwindSafe for Connection<D>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Commands for Twhere
T: ConnectionLike,
impl<T> Commands for Twhere
T: ConnectionLike,
§fn 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,
MGET
.§fn mget<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn mget<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,
fn keys<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
§fn set<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn set<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
§fn set_options<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
options: SetOptions
) -> Result<RV, RedisError>
fn set_options<K, V, RV, 'a>( &mut self, key: K, value: V, options: SetOptions ) -> Result<RV, RedisError>
§fn set_multiple<K, V, RV, 'a>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError>
fn set_multiple<K, V, RV, 'a>( &mut self, items: &'a [(K, V)] ) -> Result<RV, RedisError>
§fn mset<K, V, RV, 'a>(&mut self, items: &'a [(K, V)]) -> Result<RV, RedisError>
fn mset<K, V, RV, 'a>(&mut self, items: &'a [(K, V)]) -> Result<RV, RedisError>
§fn set_ex<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
seconds: usize
) -> Result<RV, RedisError>
fn set_ex<K, V, RV, 'a>( &mut self, key: K, value: V, seconds: usize ) -> Result<RV, RedisError>
§fn pset_ex<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
milliseconds: usize
) -> Result<RV, RedisError>
fn pset_ex<K, V, RV, 'a>( &mut self, key: K, value: V, milliseconds: usize ) -> Result<RV, RedisError>
§fn set_nx<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn set_nx<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
§fn mset_nx<K, V, RV, 'a>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError>
fn mset_nx<K, V, RV, 'a>( &mut self, items: &'a [(K, V)] ) -> Result<RV, RedisError>
§fn getset<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn getset<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
§fn 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,
§fn setrange<K, V, RV, 'a>(
&mut self,
key: K,
offset: isize,
value: V
) -> Result<RV, RedisError>
fn setrange<K, V, RV, 'a>( &mut self, key: K, offset: isize, value: V ) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn key_type<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn key_type<K, RV, 'a>(&mut self, key: K) -> 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,
fn expire<K, RV, 'a>(
&mut self,
key: K,
seconds: 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,
fn expire_at<K, RV, 'a>(&mut self, key: K, ts: 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,
fn pexpire<K, RV, 'a>(&mut self, key: K, ms: 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,
fn pexpire_at<K, RV, 'a>(&mut self, key: K, ts: usize) -> 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,
fn persist<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,
fn ttl<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,
fn pttl<K, RV, 'a>(&mut self, key: K) -> 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,
fn get_ex<K, RV, 'a>(
&mut self,
key: K,
expire_at: Expiry
) -> 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,
fn get_del<K, RV, 'a>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
§fn rename<K, N, RV, 'a>(&mut self, key: K, new_key: N) -> Result<RV, RedisError>
fn rename<K, N, RV, 'a>(&mut self, key: K, new_key: N) -> Result<RV, RedisError>
§fn rename_nx<K, N, RV, 'a>(
&mut self,
key: K,
new_key: N
) -> Result<RV, RedisError>
fn rename_nx<K, N, RV, 'a>( &mut self, key: K, new_key: N ) -> Result<RV, RedisError>
§fn 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,
§fn append<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn append<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
§fn incr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
fn incr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
INCRBY
or INCRBYFLOAT
depending on the type.§fn decr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
fn decr<K, V, RV, 'a>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn 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,
§fn 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,
§fn bit_and<D, S, RV, 'a>(
&mut self,
dstkey: D,
srckeys: S
) -> Result<RV, RedisError>
fn bit_and<D, S, RV, 'a>( &mut self, dstkey: D, srckeys: S ) -> Result<RV, RedisError>
§fn bit_or<D, S, RV, 'a>(
&mut self,
dstkey: D,
srckeys: S
) -> Result<RV, RedisError>
fn bit_or<D, S, RV, 'a>( &mut self, dstkey: D, srckeys: S ) -> Result<RV, RedisError>
§fn bit_xor<D, S, RV, 'a>(
&mut self,
dstkey: D,
srckeys: S
) -> Result<RV, RedisError>
fn bit_xor<D, S, RV, 'a>( &mut self, dstkey: D, srckeys: S ) -> Result<RV, RedisError>
§fn bit_not<D, S, RV, 'a>(
&mut self,
dstkey: D,
srckey: S
) -> Result<RV, RedisError>
fn bit_not<D, S, RV, 'a>( &mut self, dstkey: D, srckey: S ) -> Result<RV, RedisError>
§fn 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,
§fn hget<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>
fn hget<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>
§fn hdel<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>
fn hdel<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>
§fn hset<K, F, V, RV, 'a>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError>
fn hset<K, F, V, RV, 'a>( &mut self, key: K, field: F, value: V ) -> Result<RV, RedisError>
§fn hset_nx<K, F, V, RV, 'a>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError>
fn hset_nx<K, F, V, RV, 'a>( &mut self, key: K, field: F, value: V ) -> Result<RV, RedisError>
§fn hset_multiple<K, F, V, RV, 'a>(
&mut self,
key: K,
items: &'a [(F, V)]
) -> Result<RV, RedisError>
fn hset_multiple<K, F, V, RV, 'a>( &mut self, key: K, items: &'a [(F, V)] ) -> Result<RV, RedisError>
§fn hincr<K, F, D, RV, 'a>(
&mut self,
key: K,
field: F,
delta: D
) -> Result<RV, RedisError>
fn hincr<K, F, D, RV, 'a>( &mut self, key: K, field: F, delta: D ) -> Result<RV, RedisError>
§fn hexists<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>
fn hexists<K, F, RV, 'a>(&mut self, key: K, field: F) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn 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,
§fn 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,
§fn blmove<S, D, RV, 'a>(
&mut self,
srckey: S,
dstkey: D,
src_dir: Direction,
dst_dir: Direction,
timeout: usize
) -> Result<RV, RedisError>
fn blmove<S, D, RV, 'a>( &mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, timeout: usize ) -> Result<RV, RedisError>
§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,
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,
count
elements from the first non-empty list key from the list of
provided key names; or blocks until one is available.§fn 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,
§fn 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,
§fn brpoplpush<S, D, RV, 'a>(
&mut self,
srckey: S,
dstkey: D,
timeout: usize
) -> Result<RV, RedisError>
fn brpoplpush<S, D, RV, 'a>( &mut self, srckey: S, dstkey: D, timeout: usize ) -> Result<RV, RedisError>
§fn 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,
§fn linsert_before<K, P, V, RV, 'a>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError>
fn linsert_before<K, P, V, RV, 'a>( &mut self, key: K, pivot: P, value: V ) -> Result<RV, RedisError>
§fn linsert_after<K, P, V, RV, 'a>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError>
fn linsert_after<K, P, V, RV, 'a>( &mut self, key: K, pivot: P, value: V ) -> Result<RV, RedisError>
§fn 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,
§fn lmove<S, D, RV, 'a>(
&mut self,
srckey: S,
dstkey: D,
src_dir: Direction,
dst_dir: Direction
) -> Result<RV, RedisError>
fn lmove<S, D, RV, 'a>( &mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction ) -> Result<RV, RedisError>
§fn 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,
count
elements from the first non-empty list key from the list of
provided key names.§fn 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,
count
first elements of the list stored at key. Read more§fn lpos<K, V, RV, 'a>(
&mut self,
key: K,
value: V,
options: LposOptions
) -> Result<RV, RedisError>
fn lpos<K, V, RV, 'a>( &mut self, key: K, value: V, options: LposOptions ) -> Result<RV, RedisError>
§fn lpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn lpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
§fn lpush_exists<K, V, RV, 'a>(
&mut self,
key: K,
value: V
) -> Result<RV, RedisError>
fn lpush_exists<K, V, RV, 'a>( &mut self, key: K, value: V ) -> Result<RV, RedisError>
§fn 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,
§fn lrem<K, V, RV, 'a>(
&mut self,
key: K,
count: isize,
value: V
) -> Result<RV, RedisError>
fn lrem<K, V, RV, 'a>( &mut self, key: K, count: isize, value: V ) -> Result<RV, RedisError>
§fn 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,
§fn lset<K, V, RV, 'a>(
&mut self,
key: K,
index: isize,
value: V
) -> Result<RV, RedisError>
fn lset<K, V, RV, 'a>( &mut self, key: K, index: isize, value: V ) -> Result<RV, RedisError>
§fn 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,
count
last elements of the list stored at key Read more§fn rpoplpush<K, D, RV, 'a>(
&mut self,
key: K,
dstkey: D
) -> Result<RV, RedisError>
fn rpoplpush<K, D, RV, 'a>( &mut self, key: K, dstkey: D ) -> Result<RV, RedisError>
§fn rpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn rpush<K, V, RV, 'a>(&mut self, key: K, value: V) -> Result<RV, RedisError>
§fn rpush_exists<K, V, RV, 'a>(
&mut self,
key: K,
value: V
) -> Result<RV, RedisError>
fn rpush_exists<K, V, RV, 'a>( &mut self, key: K, value: V ) -> Result<RV, RedisError>
§fn sadd<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn sadd<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn sdiffstore<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: K
) -> Result<RV, RedisError>
fn sdiffstore<D, K, RV, 'a>( &mut self, dstkey: D, keys: K ) -> Result<RV, RedisError>
§fn 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,
§fn sinterstore<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: K
) -> Result<RV, RedisError>
fn sinterstore<D, K, RV, 'a>( &mut self, dstkey: D, keys: K ) -> Result<RV, RedisError>
§fn sismember<K, M, RV, 'a>(
&mut self,
key: K,
member: M
) -> Result<RV, RedisError>
fn sismember<K, M, RV, 'a>( &mut self, key: K, member: M ) -> Result<RV, RedisError>
§fn 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,
§fn smove<S, D, M, RV, 'a>(
&mut self,
srckey: S,
dstkey: D,
member: M
) -> Result<RV, RedisError>
fn smove<S, D, M, RV, 'a>( &mut self, srckey: S, dstkey: D, member: M ) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn 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,
§fn srem<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn srem<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
§fn 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,
§fn sunionstore<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: K
) -> Result<RV, RedisError>
fn sunionstore<D, K, RV, 'a>( &mut self, dstkey: D, keys: K ) -> Result<RV, RedisError>
§fn zadd<K, S, M, RV, 'a>(
&mut self,
key: K,
member: M,
score: S
) -> Result<RV, RedisError>
fn zadd<K, S, M, RV, 'a>( &mut self, key: K, member: M, score: S ) -> Result<RV, RedisError>
§fn zadd_multiple<K, S, M, RV, 'a>(
&mut self,
key: K,
items: &'a [(S, M)]
) -> Result<RV, RedisError>
fn zadd_multiple<K, S, M, RV, 'a>( &mut self, key: K, items: &'a [(S, M)] ) -> Result<RV, RedisError>
§fn 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,
§fn zcount<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>
fn zcount<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM ) -> Result<RV, RedisError>
§fn zincr<K, M, D, RV, 'a>(
&mut self,
key: K,
member: M,
delta: D
) -> Result<RV, RedisError>
fn zincr<K, M, D, RV, 'a>( &mut self, key: K, member: M, delta: D ) -> Result<RV, RedisError>
§fn zinterstore<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [K]
) -> Result<RV, RedisError>
fn zinterstore<D, K, RV, 'a>( &mut self, dstkey: D, keys: &'a [K] ) -> Result<RV, RedisError>
§fn zinterstore_min<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [K]
) -> Result<RV, RedisError>
fn zinterstore_min<D, K, RV, 'a>( &mut self, dstkey: D, keys: &'a [K] ) -> Result<RV, RedisError>
§fn zinterstore_max<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [K]
) -> Result<RV, RedisError>
fn zinterstore_max<D, K, RV, 'a>( &mut self, dstkey: D, keys: &'a [K] ) -> Result<RV, RedisError>
§fn zinterstore_weights<D, K, W, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>
fn zinterstore_weights<D, K, W, RV, 'a>( &mut self, dstkey: D, keys: &'a [(K, W)] ) -> Result<RV, RedisError>
Commands::zinterstore
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple.§fn zinterstore_min_weights<D, K, W, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>
fn zinterstore_min_weights<D, K, W, RV, 'a>( &mut self, dstkey: D, keys: &'a [(K, W)] ) -> Result<RV, RedisError>
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.§fn zinterstore_max_weights<D, K, W, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>
fn zinterstore_max_weights<D, K, W, RV, 'a>( &mut self, dstkey: D, keys: &'a [(K, W)] ) -> Result<RV, RedisError>
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.§fn zlexcount<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>
fn zlexcount<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM ) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn 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,
§fn 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,
§fn 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,
count == None
)§fn 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,
§fn 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,
§fn 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,
§fn zrangebylex<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>
fn zrangebylex<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM ) -> Result<RV, RedisError>
§fn zrangebylex_limit<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>
fn zrangebylex_limit<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize ) -> Result<RV, RedisError>
§fn zrevrangebylex<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>
fn zrevrangebylex<K, MM, M, RV, 'a>( &mut self, key: K, max: MM, min: M ) -> Result<RV, RedisError>
§fn zrevrangebylex_limit<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>
fn zrevrangebylex_limit<K, MM, M, RV, 'a>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize ) -> Result<RV, RedisError>
§fn zrangebyscore<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>
fn zrangebyscore<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM ) -> Result<RV, RedisError>
§fn zrangebyscore_withscores<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>
fn zrangebyscore_withscores<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM ) -> Result<RV, RedisError>
§fn zrangebyscore_limit<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>
fn zrangebyscore_limit<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize ) -> Result<RV, RedisError>
§fn zrangebyscore_limit_withscores<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError>
fn zrangebyscore_limit_withscores<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize ) -> Result<RV, RedisError>
§fn zrank<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn zrank<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
§fn zrem<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>
fn zrem<K, M, RV, 'a>(&mut self, key: K, members: M) -> Result<RV, RedisError>
§fn zrembylex<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>
fn zrembylex<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM ) -> Result<RV, RedisError>
§fn 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,
§fn zrembyscore<K, M, MM, RV, 'a>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError>
fn zrembyscore<K, M, MM, RV, 'a>( &mut self, key: K, min: M, max: MM ) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn zrevrangebyscore<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>
fn zrevrangebyscore<K, MM, M, RV, 'a>( &mut self, key: K, max: MM, min: M ) -> Result<RV, RedisError>
§fn zrevrangebyscore_withscores<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError>
fn zrevrangebyscore_withscores<K, MM, M, RV, 'a>( &mut self, key: K, max: MM, min: M ) -> Result<RV, RedisError>
§fn zrevrangebyscore_limit<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>
fn zrevrangebyscore_limit<K, MM, M, RV, 'a>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize ) -> Result<RV, RedisError>
§fn zrevrangebyscore_limit_withscores<K, MM, M, RV, 'a>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError>
fn zrevrangebyscore_limit_withscores<K, MM, M, RV, 'a>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize ) -> Result<RV, RedisError>
§fn zrevrank<K, M, RV, 'a>(
&mut self,
key: K,
member: M
) -> Result<RV, RedisError>
fn zrevrank<K, M, RV, 'a>( &mut self, key: K, member: M ) -> Result<RV, RedisError>
§fn zscore<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn zscore<K, M, RV, 'a>(&mut self, key: K, member: M) -> Result<RV, RedisError>
§fn zscore_multiple<K, M, RV, 'a>(
&mut self,
key: K,
members: &'a [M]
) -> Result<RV, RedisError>
fn zscore_multiple<K, M, RV, 'a>( &mut self, key: K, members: &'a [M] ) -> Result<RV, RedisError>
§fn zunionstore<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [K]
) -> Result<RV, RedisError>
fn zunionstore<D, K, RV, 'a>( &mut self, dstkey: D, keys: &'a [K] ) -> Result<RV, RedisError>
§fn zunionstore_min<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [K]
) -> Result<RV, RedisError>
fn zunionstore_min<D, K, RV, 'a>( &mut self, dstkey: D, keys: &'a [K] ) -> Result<RV, RedisError>
§fn zunionstore_max<D, K, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [K]
) -> Result<RV, RedisError>
fn zunionstore_max<D, K, RV, 'a>( &mut self, dstkey: D, keys: &'a [K] ) -> Result<RV, RedisError>
§fn zunionstore_weights<D, K, W, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>
fn zunionstore_weights<D, K, W, RV, 'a>( &mut self, dstkey: D, keys: &'a [(K, W)] ) -> Result<RV, RedisError>
Commands::zunionstore
, but with the ability to specify a
multiplication factor for each sorted set by pairing one with each key
in a tuple.§fn zunionstore_min_weights<D, K, W, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>
fn zunionstore_min_weights<D, K, W, RV, 'a>( &mut self, dstkey: D, keys: &'a [(K, W)] ) -> Result<RV, RedisError>
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.§fn zunionstore_max_weights<D, K, W, RV, 'a>(
&mut self,
dstkey: D,
keys: &'a [(K, W)]
) -> Result<RV, RedisError>
fn zunionstore_max_weights<D, K, W, RV, 'a>( &mut self, dstkey: D, keys: &'a [(K, W)] ) -> Result<RV, RedisError>
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.§fn pfadd<K, E, RV, 'a>(&mut self, key: K, element: E) -> Result<RV, RedisError>
fn pfadd<K, E, RV, 'a>(&mut self, key: K, element: E) -> Result<RV, RedisError>
§fn 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,
§fn pfmerge<D, S, RV, 'a>(
&mut self,
dstkey: D,
srckeys: S
) -> Result<RV, RedisError>
fn pfmerge<D, S, RV, 'a>( &mut self, dstkey: D, srckeys: S ) -> Result<RV, RedisError>
§fn publish<K, E, RV, 'a>(
&mut self,
channel: K,
message: E
) -> Result<RV, RedisError>
fn publish<K, E, RV, 'a>( &mut self, channel: K, message: E ) -> Result<RV, RedisError>
§fn 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,
§fn 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,
§fn 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,
§fn 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,
§fn 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,
§fn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError>where
RV: FromRedisValue,
fn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError>where
RV: FromRedisValue,
§fn 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,
§fn 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,
§fn hscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>
fn hscan_match<K, P, RV>( &mut self, key: K, pattern: P ) -> Result<Iter<'_, RV>, RedisError>
§fn 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,
§fn sscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>
fn sscan_match<K, P, RV>( &mut self, key: K, pattern: P ) -> Result<Iter<'_, RV>, RedisError>
§fn 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,
§fn zscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError>
fn zscan_match<K, P, RV>( &mut self, key: K, pattern: P ) -> Result<Iter<'_, RV>, RedisError>
§impl<C, T> ConnectionLike for Twhere
C: ConnectionLike,
T: DerefMut<Target = C>,
impl<C, T> ConnectionLike for Twhere
C: ConnectionLike,
T: DerefMut<Target = C>,
§fn req_packed_command(&mut self, cmd: &[u8]) -> Result<Value, RedisError>
fn req_packed_command(&mut self, cmd: &[u8]) -> Result<Value, RedisError>
§fn req_packed_commands(
&mut self,
cmd: &[u8],
offset: usize,
count: usize
) -> Result<Vec<Value>, RedisError>
fn req_packed_commands( &mut self, cmd: &[u8], offset: usize, count: usize ) -> Result<Vec<Value>, RedisError>
count
responses from it. This is used to implement
pipelining.§fn req_command(&mut self, cmd: &Cmd) -> Result<Value, RedisError>
fn req_command(&mut self, cmd: &Cmd) -> Result<Value, RedisError>
§fn get_db(&self) -> i64
fn get_db(&self) -> i64
fn supports_pipelining(&self) -> bool
§fn check_connection(&mut self) -> bool
fn check_connection(&mut self) -> bool
PING
internally).source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
§fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
self
into a collection.fn mapped<U, F, A>(self, f: F) -> SmallVec<A>where
F: FnMut(T) -> U,
A: Array<Item = U>,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute
] value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
[Quirk
] value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition
] value
applies. Replaces any previous condition.
See the crate level docs for more details.
Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);