Skip to main content

Either

Enum Either 

Source
pub enum Either<L, R> {
    Left(L),
    Right(R),
}
Expand description

The enum Either with variants Left and Right is a general purpose sum type with two cases.

The Either type is symmetric and treats its variants the same way, without preference. (For representing success or error, use the regular Result enum instead.)

Variants§

§

Left(L)

A value of type L.

§

Right(R)

A value of type R.

Implementations§

Source§

impl<L, R> Either<L, R>

Source

pub fn is_left(&self) -> bool

Return true if the value is the Left variant.

use either::*;

let values = [Left(1), Right("the right value")];
assert_eq!(values[0].is_left(), true);
assert_eq!(values[1].is_left(), false);
Source

pub fn is_left_and<F>(self, f: F) -> bool
where F: FnOnce(L) -> bool,

Returns true if the value is Left and the value inside of it matches a predicate.

§Examples
use either::*;

let left0: Either<i32, i32> = Left(0);
let left2: Either<i32, i32> = Left(2);
let right: Either<i32, i32> = Right(2);

assert_eq!(left2.is_left_and(|n| n > 1), true);
assert_eq!(left0.is_left_and(|n| n > 1), false);
assert_eq!(right.is_left_and(|n| n > 1), false);
Source

pub fn is_right_and<F>(self, f: F) -> bool
where F: FnOnce(R) -> bool,

Returns true if the value is Right and the value inside of it matches a predicate.

§Examples
use either::*;

let right0: Either<i32, i32> = Right(0);
let right2: Either<i32, i32> = Right(2);
let left: Either<i32, i32> = Left(2);

assert_eq!(right2.is_right_and(|n| n > 1), true);
assert_eq!(right0.is_right_and(|n| n > 1), false);
assert_eq!(left.is_right_and(|n| n > 1), false);
Source

pub fn is_right(&self) -> bool

Return true if the value is the Right variant.

use either::*;

let values = [Left(1), Right("the right value")];
assert_eq!(values[0].is_right(), false);
assert_eq!(values[1].is_right(), true);
Source

pub fn left(self) -> Option<L>

Convert the left side of Either<L, R> to an Option<L>.

use either::*;

let left: Either<_, ()> = Left("some value");
assert_eq!(left.left(),  Some("some value"));

let right: Either<(), _> = Right(321);
assert_eq!(right.left(), None);
Source

pub fn right(self) -> Option<R>

Convert the right side of Either<L, R> to an Option<R>.

use either::*;

let left: Either<_, ()> = Left("some value");
assert_eq!(left.right(),  None);

let right: Either<(), _> = Right(321);
assert_eq!(right.right(), Some(321));
Source

pub fn as_ref(&self) -> Either<&L, &R> ⓘ

Convert &Either<L, R> to Either<&L, &R>.

use either::*;

let left: Either<_, ()> = Left("some value");
assert_eq!(left.as_ref(), Left(&"some value"));

let right: Either<(), _> = Right("some value");
assert_eq!(right.as_ref(), Right(&"some value"));
Source

pub fn as_mut(&mut self) -> Either<&mut L, &mut R> ⓘ

Convert &mut Either<L, R> to Either<&mut L, &mut R>.

use either::*;

fn mutate_left(value: &mut Either<u32, u32>) {
    if let Some(l) = value.as_mut().left() {
        *l = 999;
    }
}

let mut left = Left(123);
let mut right = Right(123);
mutate_left(&mut left);
mutate_left(&mut right);
assert_eq!(left, Left(999));
assert_eq!(right, Right(123));
Source

pub fn as_pin_ref(self: Pin<&Either<L, R>>) -> Either<Pin<&L>, Pin<&R>> ⓘ

Convert Pin<&Either<L, R>> to Either<Pin<&L>, Pin<&R>>, pinned projections of the inner variants.

Source

pub fn as_pin_mut( self: Pin<&mut Either<L, R>>, ) -> Either<Pin<&mut L>, Pin<&mut R>> ⓘ

Convert Pin<&mut Either<L, R>> to Either<Pin<&mut L>, Pin<&mut R>>, pinned projections of the inner variants.

Source

pub fn flip(self) -> Either<R, L> ⓘ

Convert Either<L, R> to Either<R, L>.

use either::*;

let left: Either<_, ()> = Left(123);
assert_eq!(left.flip(), Right(123));

let right: Either<(), _> = Right("some value");
assert_eq!(right.flip(), Left("some value"));
Source

pub fn map_left<F, M>(self, f: F) -> Either<M, R> ⓘ
where F: FnOnce(L) -> M,

Apply the function f on the value in the Left variant if it is present rewrapping the result in Left.

use either::*;

let left: Either<_, u32> = Left(123);
assert_eq!(left.map_left(|x| x * 2), Left(246));

let right: Either<u32, _> = Right(123);
assert_eq!(right.map_left(|x| x * 2), Right(123));
Source

pub fn map_right<F, S>(self, f: F) -> Either<L, S> ⓘ
where F: FnOnce(R) -> S,

Apply the function f on the value in the Right variant if it is present rewrapping the result in Right.

use either::*;

let left: Either<_, u32> = Left(123);
assert_eq!(left.map_right(|x| x * 2), Left(123));

let right: Either<u32, _> = Right(123);
assert_eq!(right.map_right(|x| x * 2), Right(246));
Source

pub fn map_left_or<F, S>(self, default: S, f: F) -> S
where F: FnOnce(L) -> S,

Returns the provided default (if Right), or applies a function to the contained value (if Left).

§Examples
use either::*;

let x: Either<_, i32> = Left(123);
assert_eq!(x.map_left_or(0, |n| n * 2), 246);

let x: Either<i32, _> = Right(123);
assert_eq!(x.map_left_or(0, |n| n * 2), 0);
Source

pub fn map_right_or<F, S>(self, default: S, f: F) -> S
where F: FnOnce(R) -> S,

Returns the provided default (if Left), or applies a function to the contained value (if Right).

§Examples
use either::*;

let x: Either<_, i32> = Left(123);
assert_eq!(x.map_right_or(0, |n| n * 2), 0);

let x: Either<i32, _> = Right(123);
assert_eq!(x.map_right_or(0, |n| n * 2), 246);
Source

pub fn map_either<F, G, M, S>(self, f: F, g: G) -> Either<M, S> ⓘ
where F: FnOnce(L) -> M, G: FnOnce(R) -> S,

Apply the functions f and g to the Left and Right variants respectively. This is equivalent to bimap in functional programming.

use either::*;

let f = |s: String| s.len();
let g = |u: u8| u.to_string();

let left: Either<String, u8> = Left("loopy".into());
assert_eq!(left.map_either(f, g), Left(5));

let right: Either<String, u8> = Right(42);
assert_eq!(right.map_either(f, g), Right("42".into()));
Source

pub fn map_either_with<Ctx, F, G, M, S>( self, ctx: Ctx, f: F, g: G, ) -> Either<M, S> ⓘ
where F: FnOnce(Ctx, L) -> M, G: FnOnce(Ctx, R) -> S,

Similar to map_either, with an added context ctx accessible to both functions.

use either::*;

let mut sum = 0;

// Both closures want to update the same value, so pass it as context.
let mut f = |sum: &mut usize, s: String| { *sum += s.len(); s.to_uppercase() };
let mut g = |sum: &mut usize, u: usize| { *sum += u; u.to_string() };

let left: Either<String, usize> = Left("loopy".into());
assert_eq!(left.map_either_with(&mut sum, &mut f, &mut g), Left("LOOPY".into()));

let right: Either<String, usize> = Right(42);
assert_eq!(right.map_either_with(&mut sum, &mut f, &mut g), Right("42".into()));

assert_eq!(sum, 47);
Source

pub fn either<F, G, T>(self, f: F, g: G) -> T
where F: FnOnce(L) -> T, G: FnOnce(R) -> T,

Apply one of two functions depending on contents, unifying their result. If the value is Left(L) then the first function f is applied; if it is Right(R) then the second function g is applied.

use either::*;

fn square(n: u32) -> i32 { (n * n) as i32 }
fn negate(n: i32) -> i32 { -n }

let left: Either<u32, i32> = Left(4);
assert_eq!(left.either(square, negate), 16);

let right: Either<u32, i32> = Right(-4);
assert_eq!(right.either(square, negate), 4);
Source

pub fn either_with<Ctx, F, G, T>(self, ctx: Ctx, f: F, g: G) -> T
where F: FnOnce(Ctx, L) -> T, G: FnOnce(Ctx, R) -> T,

Like either, but provide some context to whichever of the functions ends up being called.

// In this example, the context is a mutable reference
use either::*;

let mut result = Vec::new();

let values = vec![Left(2), Right(2.7)];

for value in values {
    value.either_with(&mut result,
                      |ctx, integer| ctx.push(integer),
                      |ctx, real| ctx.push(f64::round(real) as i32));
}

assert_eq!(result, vec![2, 3]);
Source

pub fn left_and<S>(self, other: Either<S, R>) -> Either<S, R> ⓘ

Returns other if the value is Left, otherwise returns the Right value of self.

Arguments passed to left_and are eagerly evaluated; if you are passing the result of a function call, it is recommended to use left_and_then, which is lazily evaluated.

§Examples
use either::*;

let left: Either<_, u32> = Left(123);
assert_eq!(left.left_and::<()>(Right(246)), Right(246));
assert_eq!(left.left_and(Left(246)), Left(246));

let right: Either<u32, _> = Right(123);
assert_eq!(right.left_and::<()>(Right(246)), Right(123));
assert_eq!(right.left_and(Left(246)), Right(123));
Source

pub fn right_and<S>(self, other: Either<L, S>) -> Either<L, S> ⓘ

Returns other if the value is Right, otherwise returns the Left value of self.

Arguments passed to right_and are eagerly evaluated; if you are passing the result of a function call, it is recommended to use right_and_then, which is lazily evaluated.

§Examples
use either::*;

let left: Either<_, u32> = Left(123);
assert_eq!(left.right_and(Right(246)), Left(123));
assert_eq!(left.right_and::<()>(Left(246)), Left(123));

let right: Either<u32, _> = Right(123);
assert_eq!(right.right_and(Right(246)), Right(246));
assert_eq!(right.right_and::<()>(Left(246)), Left(246));
Source

pub fn left_and_then<F, S>(self, f: F) -> Either<S, R> ⓘ
where F: FnOnce(L) -> Either<S, R>,

Apply the function f on the value in the Left variant if it is present.

use either::*;

let left: Either<_, u32> = Left(123);
assert_eq!(left.left_and_then::<_,()>(|x| Right(x * 2)), Right(246));

let right: Either<u32, _> = Right(123);
assert_eq!(right.left_and_then(|x| Right::<(), _>(x * 2)), Right(123));
Source

pub fn right_and_then<F, S>(self, f: F) -> Either<L, S> ⓘ
where F: FnOnce(R) -> Either<L, S>,

Apply the function f on the value in the Right variant if it is present.

use either::*;

let left: Either<_, u32> = Left(123);
assert_eq!(left.right_and_then(|x| Right(x * 2)), Left(123));

let right: Either<u32, _> = Right(123);
assert_eq!(right.right_and_then(|x| Right(x * 2)), Right(246));
Source

pub fn into_iter( self, ) -> Either<<L as IntoIterator>::IntoIter, <R as IntoIterator>::IntoIter> ⓘ
where L: IntoIterator, R: IntoIterator<Item = <L as IntoIterator>::Item>,

Convert the inner value to an iterator.

This requires the Left and Right iterators to have the same item type. See factor_into_iter to iterate different types.

use either::*;

let left: Either<_, Vec<u32>> = Left(vec![1, 2, 3, 4, 5]);
let mut right: Either<Vec<u32>, _> = Right(vec![]);
right.extend(left.into_iter());
assert_eq!(right, Right(vec![1, 2, 3, 4, 5]));
Source

pub fn iter( &self, ) -> Either<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter> ⓘ
where &'a L: for<'a> IntoIterator, &'a R: for<'a> IntoIterator<Item = <&'a L as IntoIterator>::Item>,

Borrow the inner value as an iterator.

This requires the Left and Right iterators to have the same item type. See factor_iter to iterate different types.

use either::*;

let left: Either<_, &[u32]> = Left(vec![2, 3]);
let mut right: Either<Vec<u32>, _> = Right(&[4, 5][..]);
let mut all = vec![1];
all.extend(left.iter());
all.extend(right.iter());
assert_eq!(all, vec![1, 2, 3, 4, 5]);
Source

pub fn iter_mut( &mut self, ) -> Either<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter> ⓘ
where &'a mut L: for<'a> IntoIterator, &'a mut R: for<'a> IntoIterator<Item = <&'a mut L as IntoIterator>::Item>,

Mutably borrow the inner value as an iterator.

This requires the Left and Right iterators to have the same item type. See factor_iter_mut to iterate different types.

use either::*;

let mut left: Either<_, &mut [u32]> = Left(vec![2, 3]);
for l in left.iter_mut() {
    *l *= *l
}
assert_eq!(left, Left(vec![4, 9]));

let mut inner = [4, 5];
let mut right: Either<Vec<u32>, _> = Right(&mut inner[..]);
for r in right.iter_mut() {
    *r *= *r
}
assert_eq!(inner, [16, 25]);
Source

pub fn factor_into_iter( self, ) -> IterEither<<L as IntoIterator>::IntoIter, <R as IntoIterator>::IntoIter>

Converts an Either of Iterators to be an Iterator of Eithers

Unlike into_iter, this does not require the Left and Right iterators to have the same item type.

use either::*;
let left: Either<_, Vec<u8>> = Left(&["hello"]);
assert_eq!(left.factor_into_iter().next(), Some(Left(&"hello")));

let right: Either<&[&str], _> = Right(vec![0, 1]);
assert_eq!(right.factor_into_iter().collect::<Vec<_>>(), vec![Right(0), Right(1)]);
Source

pub fn factor_iter( &self, ) -> IterEither<<&L as IntoIterator>::IntoIter, <&R as IntoIterator>::IntoIter>
where &'a L: for<'a> IntoIterator, &'a R: for<'a> IntoIterator,

Borrows an Either of Iterators to be an Iterator of Eithers

Unlike iter, this does not require the Left and Right iterators to have the same item type.

use either::*;
let left: Either<_, Vec<u8>> = Left(["hello"]);
assert_eq!(left.factor_iter().next(), Some(Left(&"hello")));

let right: Either<[&str; 2], _> = Right(vec![0, 1]);
assert_eq!(right.factor_iter().collect::<Vec<_>>(), vec![Right(&0), Right(&1)]);
Source

pub fn factor_iter_mut( &mut self, ) -> IterEither<<&mut L as IntoIterator>::IntoIter, <&mut R as IntoIterator>::IntoIter>
where &'a mut L: for<'a> IntoIterator, &'a mut R: for<'a> IntoIterator,

Mutably borrows an Either of Iterators to be an Iterator of Eithers

Unlike iter_mut, this does not require the Left and Right iterators to have the same item type.

use either::*;
let mut left: Either<_, Vec<u8>> = Left(["hello"]);
left.factor_iter_mut().for_each(|x| *x.unwrap_left() = "goodbye");
assert_eq!(left, Left(["goodbye"]));

let mut right: Either<[&str; 2], _> = Right(vec![0, 1, 2]);
right.factor_iter_mut().for_each(|x| if let Right(r) = x { *r = -*r; });
assert_eq!(right, Right(vec![0, -1, -2]));
Source

pub fn left_or(self, other: L) -> L

Return left value or given value

Arguments passed to left_or are eagerly evaluated; if you are passing the result of a function call, it is recommended to use left_or_else, which is lazily evaluated.

§Examples
let left: Either<&str, &str> = Left("left");
assert_eq!(left.left_or("foo"), "left");

let right: Either<&str, &str> = Right("right");
assert_eq!(right.left_or("left"), "left");
Source

pub fn left_or_default(self) -> L
where L: Default,

Return left or a default

§Examples
let left: Either<String, u32> = Left("left".to_string());
assert_eq!(left.left_or_default(), "left");

let right: Either<String, u32> = Right(42);
assert_eq!(right.left_or_default(), String::default());
Source

pub fn left_or_else<F>(self, f: F) -> L
where F: FnOnce(R) -> L,

Returns left value or computes it from a closure

§Examples
let left: Either<String, u32> = Left("3".to_string());
assert_eq!(left.left_or_else(|_| unreachable!()), "3");

let right: Either<String, u32> = Right(3);
assert_eq!(right.left_or_else(|x| x.to_string()), "3");
Source

pub fn right_or(self, other: R) -> R

Return right value or given value

Arguments passed to right_or are eagerly evaluated; if you are passing the result of a function call, it is recommended to use right_or_else, which is lazily evaluated.

§Examples
let right: Either<&str, &str> = Right("right");
assert_eq!(right.right_or("foo"), "right");

let left: Either<&str, &str> = Left("left");
assert_eq!(left.right_or("right"), "right");
Source

pub fn right_or_default(self) -> R
where R: Default,

Return right or a default

§Examples
let left: Either<String, u32> = Left("left".to_string());
assert_eq!(left.right_or_default(), u32::default());

let right: Either<String, u32> = Right(42);
assert_eq!(right.right_or_default(), 42);
Source

pub fn right_or_else<F>(self, f: F) -> R
where F: FnOnce(L) -> R,

Returns right value or computes it from a closure

§Examples
let left: Either<String, u32> = Left("3".to_string());
assert_eq!(left.right_or_else(|x| x.parse().unwrap()), 3);

let right: Either<String, u32> = Right(3);
assert_eq!(right.right_or_else(|_| unreachable!()), 3);
Source

pub fn unwrap_left(self) -> L
where R: Debug,

Returns the left value

§Examples
let left: Either<_, ()> = Left(3);
assert_eq!(left.unwrap_left(), 3);
§Panics

When Either is a Right value

ⓘ
let right: Either<(), _> = Right(3);
right.unwrap_left();
Source

pub fn unwrap_right(self) -> R
where L: Debug,

Returns the right value

§Examples
let right: Either<(), _> = Right(3);
assert_eq!(right.unwrap_right(), 3);
§Panics

When Either is a Left value

ⓘ
let left: Either<_, ()> = Left(3);
left.unwrap_right();
Source

pub fn expect_left(self, msg: &str) -> L
where R: Debug,

Returns the left value

§Examples
let left: Either<_, ()> = Left(3);
assert_eq!(left.expect_left("value was Right"), 3);
§Panics

When Either is a Right value

ⓘ
let right: Either<(), _> = Right(3);
right.expect_left("value was Right");
Source

pub fn expect_right(self, msg: &str) -> R
where L: Debug,

Returns the right value

§Examples
let right: Either<(), _> = Right(3);
assert_eq!(right.expect_right("value was Left"), 3);
§Panics

When Either is a Left value

ⓘ
let left: Either<_, ()> = Left(3);
left.expect_right("value was Right");
Source

pub fn inspect_left<F>(self, f: F) -> Either<L, R> ⓘ
where F: FnOnce(&L),

Calls a function with a reference to the contained value if Left.

Returns the original self.

§Examples
use either::*;

let x = foo()
    .inspect_left(|n| println!("left: {n}"))
    .left_or(0);
Source

pub fn inspect_right<F>(self, f: F) -> Either<L, R> ⓘ
where F: FnOnce(&R),

Calls a function with a reference to the contained value if Right.

Returns the original self.

§Examples
use either::*;

let x = foo()
    .inspect_right(|n| println!("right: {n}"))
    .left_or(0);
Source

pub fn either_into<T>(self) -> T
where L: Into<T>, R: Into<T>,

Convert the contained value into T

§Examples
// Both u16 and u32 can be converted to u64.
let left: Either<u16, u32> = Left(3u16);
assert_eq!(left.either_into::<u64>(), 3u64);
let right: Either<u16, u32> = Right(7u32);
assert_eq!(right.either_into::<u64>(), 7u64);
Source§

impl<L, R> Either<Option<L>, Option<R>>

Source

pub fn factor_none(self) -> Option<Either<L, R>>

Factors out None from an Either of Option.

use either::*;
let left: Either<_, Option<String>> = Left(Some(vec![0]));
assert_eq!(left.factor_none(), Some(Left(vec![0])));

let right: Either<Option<Vec<u8>>, _> = Right(Some(String::new()));
assert_eq!(right.factor_none(), Some(Right(String::new())));
Source§

impl<L, R, E> Either<Result<L, E>, Result<R, E>>

Source

pub fn factor_err(self) -> Result<Either<L, R>, E>

Factors out a homogeneous type from an Either of Result.

Here, the homogeneous type is the Err type of the Result.

use either::*;
let left: Either<_, Result<String, u32>> = Left(Ok(vec![0]));
assert_eq!(left.factor_err(), Ok(Left(vec![0])));

let right: Either<Result<Vec<u8>, u32>, _> = Right(Ok(String::new()));
assert_eq!(right.factor_err(), Ok(Right(String::new())));
Source§

impl<T, L, R> Either<Result<T, L>, Result<T, R>>

Source

pub fn factor_ok(self) -> Result<T, Either<L, R>>

Factors out a homogeneous type from an Either of Result.

Here, the homogeneous type is the Ok type of the Result.

use either::*;
let left: Either<_, Result<u32, String>> = Left(Err(vec![0]));
assert_eq!(left.factor_ok(), Err(Left(vec![0])));

let right: Either<Result<u32, Vec<u8>>, _> = Right(Err(String::new()));
assert_eq!(right.factor_ok(), Err(Right(String::new())));
Source§

impl<T, L, R> Either<(T, L), (T, R)>

Source

pub fn factor_first(self) -> (T, Either<L, R>)

Factor out a homogeneous type from an either of pairs.

Here, the homogeneous type is the first element of the pairs.

use either::*;
let left: Either<_, (u32, String)> = Left((123, vec![0]));
assert_eq!(left.factor_first().0, 123);

let right: Either<(u32, Vec<u8>), _> = Right((123, String::new()));
assert_eq!(right.factor_first().0, 123);
Source§

impl<T, L, R> Either<(L, T), (R, T)>

Source

pub fn factor_second(self) -> (Either<L, R>, T)

Factor out a homogeneous type from an either of pairs.

Here, the homogeneous type is the second element of the pairs.

use either::*;
let left: Either<_, (String, u32)> = Left((vec![0], 123));
assert_eq!(left.factor_second().1, 123);

let right: Either<(Vec<u8>, u32), _> = Right((String::new(), 123));
assert_eq!(right.factor_second().1, 123);
Source§

impl<T> Either<T, T>

Source

pub fn into_inner(self) -> T

Extract the value of an either over two equivalent types.

use either::*;

let left: Either<_, u32> = Left(123);
assert_eq!(left.into_inner(), 123);

let right: Either<u32, _> = Right(123);
assert_eq!(right.into_inner(), 123);
Source

pub fn map<F, M>(self, f: F) -> Either<M, M> ⓘ
where F: FnOnce(T) -> M,

Map f over the contained value and return the result in the corresponding variant.

use either::*;

let value: Either<_, i32> = Right(42);

let other = value.map(|x| x * 2);
assert_eq!(other, Right(84));
Source§

impl<L, R> Either<&L, &R>

Source

pub fn cloned(self) -> Either<L, R> ⓘ
where L: Clone, R: Clone,

Maps an Either<&L, &R> to an Either<L, R> by cloning the contents of either branch.

Source

pub fn copied(self) -> Either<L, R> ⓘ
where L: Copy, R: Copy,

Maps an Either<&L, &R> to an Either<L, R> by copying the contents of either branch.

Source§

impl<L, R> Either<&mut L, &mut R>

Source

pub fn cloned(self) -> Either<L, R> ⓘ
where L: Clone, R: Clone,

Maps an Either<&mut L, &mut R> to an Either<L, R> by cloning the contents of either branch.

Source

pub fn copied(self) -> Either<L, R> ⓘ
where L: Copy, R: Copy,

Maps an Either<&mut L, &mut R> to an Either<L, R> by copying the contents of either branch.

Trait Implementations§

Source§

impl<L, R> AsMut<CStr> for Either<L, R>
where L: AsMut<CStr>, R: AsMut<CStr>,

Available on crate feature std only.

Requires crate feature std.

Source§

fn as_mut(&mut self) -> &mut CStr

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<L, R> AsMut<OsStr> for Either<L, R>
where L: AsMut<OsStr>, R: AsMut<OsStr>,

Available on crate feature std only.

Requires crate feature std.

Source§

fn as_mut(&mut self) -> &mut OsStr

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<L, R> AsMut<Path> for Either<L, R>
where L: AsMut<Path>, R: AsMut<Path>,

Available on crate feature std only.

Requires crate feature std.

Source§

fn as_mut(&mut self) -> &mut Path

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<L, R, Target> AsMut<Target> for Either<L, R>
where L: AsMut<Target>, R: AsMut<Target>,

Source§

fn as_mut(&mut self) -> &mut Target

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<L, R, Target> AsMut<[Target]> for Either<L, R>
where L: AsMut<[Target]>, R: AsMut<[Target]>,

Source§

fn as_mut(&mut self) -> &mut [Target]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<L, R> AsMut<str> for Either<L, R>
where L: AsMut<str>, R: AsMut<str>,

Source§

fn as_mut(&mut self) -> &mut str

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<L, R> AsRef<CStr> for Either<L, R>
where L: AsRef<CStr>, R: AsRef<CStr>,

Available on crate feature std only.

Requires crate feature std.

Source§

fn as_ref(&self) -> &CStr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<L, R> AsRef<OsStr> for Either<L, R>
where L: AsRef<OsStr>, R: AsRef<OsStr>,

Available on crate feature std only.

Requires crate feature std.

Source§

fn as_ref(&self) -> &OsStr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<L, R> AsRef<Path> for Either<L, R>
where L: AsRef<Path>, R: AsRef<Path>,

Available on crate feature std only.

Requires crate feature std.

Source§

fn as_ref(&self) -> &Path

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<L, R, Target> AsRef<Target> for Either<L, R>
where L: AsRef<Target>, R: AsRef<Target>,

Source§

fn as_ref(&self) -> &Target

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<L, R, Target> AsRef<[Target]> for Either<L, R>
where L: AsRef<[Target]>, R: AsRef<[Target]>,

Source§

fn as_ref(&self) -> &[Target]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<L, R> AsRef<str> for Either<L, R>
where L: AsRef<str>, R: AsRef<str>,

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<L, R> Binary for Either<L, R>
where L: Binary, R: Binary,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> BufRead for Either<L, R>
where L: BufRead, R: BufRead,

Available on crate features std only.

Requires crate feature "std"

Source§

fn fill_buf(&mut self) -> Result<&[u8], Error>

Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty. Read more
Source§

fn consume(&mut self, amt: usize)

Marks the given amount of additional bytes from the internal buffer as having been read. Subsequent calls to read only return bytes that have not been marked as read. Read more
Source§

fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes into buf until the delimiter byte or EOF is reached. Read more
Source§

fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until a newline (the 0xA byte) is reached, and append them to the provided String buffer. Read more
Source§

fn has_data_left(&mut self) -> Result<bool, Error>

🔬This is a nightly-only experimental API. (buf_read_has_data_left)
Checks if there is any data left to be read. Read more
1.83.0 · Source§

fn skip_until(&mut self, byte: u8) -> Result<usize, Error>

Skips all bytes until the delimiter byte or EOF is reached. Read more
1.0.0 · Source§

fn split(self, byte: u8) -> Split<Self>
where Self: Sized,

Returns an iterator over the contents of this reader split on the byte byte. Read more
1.0.0 · Source§

fn lines(self) -> Lines<Self>
where Self: Sized,

Returns an iterator over the lines of this reader. Read more
Source§

impl<L, R> Clone for Either<L, R>
where L: Clone, R: Clone,

Source§

fn clone(&self) -> Either<L, R> ⓘ

Returns a duplicate of the value. Read more
Source§

fn clone_from(&mut self, source: &Either<L, R>)

Performs copy-assignment from source. Read more
Source§

impl<L, R> Copy for Either<L, R>
where L: Copy, R: Copy,

Source§

impl<L, R> Debug for Either<L, R>
where L: Debug, R: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> Deref for Either<L, R>
where L: Deref, R: Deref<Target = <L as Deref>::Target>,

Source§

type Target = <L as Deref>::Target

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Either<L, R> as Deref>::Target ⓘ

Dereferences the value.
Source§

impl<L, R> DerefMut for Either<L, R>
where L: DerefMut, R: DerefMut<Target = <L as Deref>::Target>,

Source§

fn deref_mut(&mut self) -> &mut <Either<L, R> as Deref>::Target ⓘ

Mutably dereferences the value.
Source§

impl<'de, L, R> Deserialize<'de> for Either<L, R>
where L: Deserialize<'de>, R: Deserialize<'de>,

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Either<L, R>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<L, R> Display for Either<L, R>
where L: Display, R: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> DoubleEndedIterator for Either<L, R>

Source§

fn next_back(&mut self) -> Option<<Either<L, R> as Iterator>::Item>

Removes and returns an element from the end of the iterator. Read more
Source§

fn nth_back(&mut self, n: usize) -> Option<<Either<L, R> as Iterator>::Item>

Returns the nth element from the end of the iterator. Read more
Source§

fn rfold<Acc, G>(self, init: Acc, f: G) -> Acc
where G: FnMut(Acc, <Either<L, R> as Iterator>::Item) -> Acc,

An iterator method that reduces the iterator’s elements to a single, final value, starting from the back. Read more
Source§

fn rfind<P>(&mut self, predicate: P) -> Option<<Either<L, R> as Iterator>::Item>
where P: FnMut(&<Either<L, R> as Iterator>::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
Source§

fn next_chunk_back<const N: usize>( &mut self, ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances from the back of the iterator and returns an array containing the next N values in sequence. Read more
Source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.27.0 (const: unstable) · Source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes elements starting from the back of the iterator. Read more
Source§

impl<L, R> Eq for Either<L, R>
where L: Eq, R: Eq,

Source§

impl<L, R> Error for Either<L, R>
where L: Error, R: Error,

Available on crate features std only.

Either implements Error if both L and R implement it.

Requires crate feature "std"

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<L, R> ExactSizeIterator for Either<L, R>
where L: ExactSizeIterator, R: ExactSizeIterator<Item = <L as Iterator>::Item>,

Source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
Source§

impl<L, R, A> Extend<A> for Either<L, R>
where L: Extend<A>, R: Extend<A>,

Source§

fn extend<T>(&mut self, iter: T)
where T: IntoIterator<Item = A>,

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<L, R> From<Either<L, R>> for Result<R, L>

Convert from Either to Result with Right => Ok and Left => Err.

Source§

fn from(val: Either<L, R>) -> Result<R, L>

Converts to this type from the input type.
Source§

impl<L, R> From<Result<R, L>> for Either<L, R>

Convert from Result to Either with Ok => Right and Err => Left.

Source§

fn from(r: Result<R, L>) -> Either<L, R> ⓘ

Converts to this type from the input type.
Source§

impl<L, R> FusedIterator for Either<L, R>
where L: FusedIterator, R: FusedIterator<Item = <L as Iterator>::Item>,

Source§

impl<L, R> Future for Either<L, R>
where L: Future, R: Future<Output = <L as Future>::Output>,

Either<L, R> is a future if both L and R are futures.

Source§

type Output = <L as Future>::Output

The type of value produced on completion.
Source§

fn poll( self: Pin<&mut Either<L, R>>, cx: &mut Context<'_>, ) -> Poll<<Either<L, R> as Future>::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<L, R> Hash for Either<L, R>
where L: Hash, R: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<L, R> Iterator for Either<L, R>
where L: Iterator, R: Iterator<Item = <L as Iterator>::Item>,

Either<L, R> is an iterator if both L and R are iterators.

Source§

type Item = <L as Iterator>::Item

The type of the elements being iterated over.
Source§

fn next(&mut self) -> Option<<Either<L, R> as Iterator>::Item>

Advances the iterator and returns the next value. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
Source§

fn fold<Acc, G>(self, init: Acc, f: G) -> Acc
where G: FnMut(Acc, <Either<L, R> as Iterator>::Item) -> Acc,

Folds every element into an accumulator by applying an operation, returning the final result. Read more
Source§

fn for_each<F>(self, f: F)
where F: FnMut(<Either<L, R> as Iterator>::Item),

Calls a closure on each element of an iterator. Read more
Source§

fn count(self) -> usize

Consumes the iterator, counting the number of iterations and returning it. Read more
Source§

fn last(self) -> Option<<Either<L, R> as Iterator>::Item>

Consumes the iterator, returning the last element. Read more
Source§

fn nth(&mut self, n: usize) -> Option<<Either<L, R> as Iterator>::Item>

Returns the nth element of the iterator. Read more
Source§

fn collect<B>(self) -> B
where B: FromIterator<<Either<L, R> as Iterator>::Item>,

Transforms an iterator into a collection. Read more
Source§

fn partition<B, F>(self, f: F) -> (B, B)
where B: Default + Extend<<Either<L, R> as Iterator>::Item>, F: FnMut(&<Either<L, R> as Iterator>::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
Source§

fn all<F>(&mut self, f: F) -> bool
where F: FnMut(<Either<L, R> as Iterator>::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
Source§

fn any<F>(&mut self, f: F) -> bool
where F: FnMut(<Either<L, R> as Iterator>::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
Source§

fn find<P>(&mut self, predicate: P) -> Option<<Either<L, R> as Iterator>::Item>
where P: FnMut(&<Either<L, R> as Iterator>::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
Source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where F: FnMut(<Either<L, R> as Iterator>::Item) -> Option<B>,

Applies function to the elements of iterator and returns the first non-none result. Read more
Source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where P: FnMut(<Either<L, R> as Iterator>::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
Source§

fn next_chunk<const N: usize>( &mut self, ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
Source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.28.0 (const: unstable) · Source§

fn step_by(self, step: usize) -> StepBy<Self>
where Self: Sized,

Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
1.0.0 (const: unstable) · Source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 (const: unstable) · Source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where Self: Sized, U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
Source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
where Self: Sized, Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between items of the original iterator. Read more
Source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator between items of the original iterator. Read more
1.0.0 (const: unstable) · Source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each element. Read more
1.0.0 (const: unstable) · Source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element should be yielded. Read more
1.0.0 (const: unstable) · Source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 (const: unstable) · Source§

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Creates an iterator which gives the current iteration count as well as the next value. Read more
1.0.0 (const: unstable) · Source§

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See their documentation for more information. Read more
1.0.0 (const: unstable) · Source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 (const: unstable) · Source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 (const: unstable) · Source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 (const: unstable) · Source§

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 (const: unstable) · Source§

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. Read more
1.0.0 (const: unstable) · Source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but unlike fold, produces a new iterator. Read more
1.0.0 (const: unstable) · Source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
1.29.0 (const: unstable) · Source§

fn flatten(self) -> Flatten<Self>
where Self: Sized, Self::Item: IntoIterator,

Creates an iterator that flattens nested structure. Read more
Source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where Self: Sized, F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), the windows during mapping overlap as well. Read more
1.0.0 (const: unstable) · Source§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 (const: unstable) · Source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized, F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 (const: unstable) · Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Iterator. Read more
Source§

fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
where Self: Sized, Self::Item: Try, <Self::Item as Try>::Residual: Residual<B>, B: FromIterator<<Self::Item as Try>::Output>,

🔬This is a nightly-only experimental API. (iterator_try_collect)
Fallibly transforms an iterator into a collection, short circuiting if a failure is encountered. Read more
Source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
Source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where T: 'a, Self: Sized + DoubleEndedIterator<Item = &'a mut T>, P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. Returns the number of true elements found. Read more
Source§

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, such that all those that return true precede all those that return false. Read more
1.27.0 (const: unstable) · Source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Output = B>,

An iterator method that applies a function as long as it returns successfully, producing a single, final value. Read more
1.27.0 (const: unstable) · Source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error. Read more
1.51.0 (const: unstable) · Source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing operation. Read more
Source§

fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, R: Try<Output = Self::Item>, <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the closure returns a failure, the failure is propagated back to the caller immediately. Read more
Source§

fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, R: Try<Output = bool>, <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns the first true result or the first error. Read more
1.0.0 (const: unstable) · Source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where P: FnMut(Self::Item) -> bool, Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its index. Read more
1.0.0 (const: unstable) · Source§

fn max(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 (const: unstable) · Source§

fn min(self) -> Option<Self::Item>
where Self: Sized, Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 (const: unstable) · Source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the specified function. Read more
1.15.0 (const: unstable) · Source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the specified comparison function. Read more
1.6.0 (const: unstable) · Source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the specified function. Read more
1.15.0 (const: unstable) · Source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the specified comparison function. Read more
1.0.0 (const: unstable) · Source§

fn rev(self) -> Rev<Self>
where Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 (const: unstable) · Source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 (const: unstable) · Source§

fn copied<'a, T>(self) -> Copied<Self>
where T: Copy + 'a, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 (const: unstable) · Source§

fn cloned<'a, T>(self) -> Cloned<Self>
where T: Clone + 'a, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
1.0.0 (const: unstable) · Source§

fn cycle(self) -> Cycle<Self>
where Self: Sized + Clone,

Repeats an iterator endlessly. Read more
Source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 (const: unstable) · Source§

fn sum<S>(self) -> S
where Self: Sized, S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 (const: unstable) · Source§

fn product<P>(self) -> P
where Self: Sized, P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements. Read more
1.5.0 (const: unstable) · Source§

fn cmp<I>(self, other: I) -> Ordering
where I: IntoIterator<Item = Self::Item>, Self::Item: Ord, Self: Sized,

Lexicographically compares the elements of this Iterator with those of another. Read more
Source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 (const: unstable) · Source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. As soon as an order can be determined, the evaluation stops and a result is returned. Read more
Source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 (const: unstable) · Source§

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are equal to those of another. Read more
Source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of another with respect to the specified equality function. Read more
1.5.0 (const: unstable) · Source§

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are not equal to those of another. Read more
1.5.0 (const: unstable) · Source§

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less than those of another. Read more
1.5.0 (const: unstable) · Source§

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less or equal to those of another. Read more
1.5.0 (const: unstable) · Source§

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than those of another. Read more
1.5.0 (const: unstable) · Source§

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than or equal to those of another. Read more
1.82.0 (const: unstable) · Source§

fn is_sorted(self) -> bool
where Self: Sized, Self::Item: PartialOrd,

Checks if the elements of this iterator are sorted. Read more
1.82.0 (const: unstable) · Source§

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> bool,

Checks if the elements of this iterator are sorted using the given comparator function. Read more
1.82.0 (const: unstable) · Source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, K: PartialOrd,

Checks if the elements of this iterator are sorted using the given key extraction function. Read more
Source§

impl<L, R> LowerExp for Either<L, R>
where L: LowerExp, R: LowerExp,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> LowerHex for Either<L, R>
where L: LowerHex, R: LowerHex,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> Octal for Either<L, R>
where L: Octal, R: Octal,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> Ord for Either<L, R>
where L: Ord, R: Ord,

Source§

fn cmp(&self, other: &Either<L, R>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<L, R> PartialEq for Either<L, R>
where L: PartialEq, R: PartialEq,

Source§

fn eq(&self, other: &Either<L, R>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<L, R> PartialOrd for Either<L, R>
where L: PartialOrd, R: PartialOrd,

Source§

fn partial_cmp(&self, other: &Either<L, R>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<L, R> Pointer for Either<L, R>
where L: Pointer, R: Pointer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> Read for Either<L, R>
where L: Read, R: Read,

Available on crate features std only.

Either<L, R> implements Read if both L and R do.

Requires crate feature "std"

Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf. Read more
Source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes until EOF in this source, placing them into buf. Read more
Source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until EOF in this source, appending them to buf. Read more
1.36.0 · Source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
Source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
Source§

fn read_buf(&mut self, buf: BorrowedCursor<'_, u8>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
Source§

fn read_buf_exact( &mut self, cursor: BorrowedCursor<'_, u8>, ) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Reads the exact number of bytes required to fill cursor. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Read. Read more
1.0.0 · Source§

fn bytes(self) -> Bytes<Self>
where Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · Source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where R: Read, Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · Source§

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
Source§

fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Error>
where Self: Sized,

🔬This is a nightly-only experimental API. (read_array)
Read and return a fixed array of bytes from this source. Read more
Source§

fn read_le<T>(&mut self) -> Result<T, Error>
where T: FromEndianBytes, Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in little-endian order. Read more
Source§

fn read_be<T>(&mut self) -> Result<T, Error>
where T: FromEndianBytes, Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in big-endian order. Read more
Source§

impl<L, R> Seek for Either<L, R>
where L: Seek, R: Seek,

Available on crate features std only.

Either<L, R> implements Seek if both L and R do.

Requires crate feature "std"

Source§

fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>

Seek to an offset, in bytes, in a stream. Read more
1.55.0 · Source§

fn rewind(&mut self) -> Result<(), Error>

Rewind to the beginning of a stream. Read more
Source§

fn stream_len(&mut self) -> Result<u64, Error>

🔬This is a nightly-only experimental API. (seek_stream_len)
Returns the length of this stream (in bytes). Read more
1.51.0 · Source§

fn stream_position(&mut self) -> Result<u64, Error>

Returns the current seek position from the start of the stream. Read more
1.80.0 · Source§

fn seek_relative(&mut self, offset: i64) -> Result<(), Error>

Seeks relative to the current position. Read more
Source§

impl<L, R> Serialize for Either<L, R>
where L: Serialize, R: Serialize,

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<L, R> StructuralPartialEq for Either<L, R>
where L: PartialEq, R: PartialEq,

Source§

impl<L, R> UpperExp for Either<L, R>
where L: UpperExp, R: UpperExp,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> UpperHex for Either<L, R>
where L: UpperHex, R: UpperHex,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<L, R> Write for Either<L, R>
where L: Write, R: Write,

Available on crate features std only.

Either<L, R> implements Write if both L and R do.

Requires crate feature "std"

Source§

fn write(&mut self, buf: &[u8]) -> Result<usize, Error>

Writes a buffer into this writer, returning how many bytes were written. Read more
Source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
Source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error encountered. Read more
Source§

fn flush(&mut self) -> Result<(), Error>

Flushes this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
1.36.0 · Source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
Source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
Source§

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more
Source§

impl<L, R> Write for Either<L, R>
where L: Write, R: Write,

Source§

fn write_str(&mut self, s: &str) -> Result<(), Error>

Writes a string slice into this writer, returning whether the write succeeded. Read more
Source§

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
Source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations§

§

impl<L, R> Freeze for Either<L, R>
where L: Freeze, R: Freeze,

§

impl<L, R> RefUnwindSafe for Either<L, R>

§

impl<L, R> Send for Either<L, R>
where L: Send, R: Send,

§

impl<L, R> Sync for Either<L, R>
where L: Sync, R: Sync,

§

impl<L, R> Unpin for Either<L, R>
where L: Unpin, R: Unpin,

§

impl<L, R> UnsafeUnpin for Either<L, R>
where L: UnsafeUnpin, R: UnsafeUnpin,

§

impl<L, R> UnwindSafe for Either<L, R>
where L: UnwindSafe, R: UnwindSafe,

Blanket Implementations§

§

impl<T, A, P> Access<T> for P
where A: Access<T> + ?Sized, P: Deref<Target = A>,

§

type Guard = <A as Access<T>>::Guard

A guard object containing the value and keeping it alive. Read more
§

fn load(&self) -> <P as Access<T>>::Guard

The loading method. Read more
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Backoff for T
where T: Iterator<Item = Duration> + Send + Sync + Unpin,

§

impl<B> BackoffBuilder for B
where B: Backoff,

§

type Backoff = B

The associated backoff returned by this builder.
§

fn build(self) -> <B as BackoffBuilder>::Backoff

Construct a new backoff using the builder.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Commands for T
where T: ConnectionLike,

§

fn get<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the value of a key. If key is a vec this becomes an MGET (if using TypedCommands, you should specifically use mget to get the correct return type. Redis Docs
§

fn mget<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Get values of keys Redis Docs
§

fn keys<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Gets all keys matching pattern Redis Docs
§

fn set<'a, K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Set the string value of a key. Redis Docs
§

fn set_options<'a, K, V, RV>( &mut self, key: K, value: V, options: SetOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Set the string value of a key with options. Redis Docs
§

fn mset<'a, K, V, RV>(&mut self, items: &'a [(K, V)]) -> Result<RV, RedisError>
where K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue,

Sets multiple keys to their values. Redis Docs
§

fn set_ex<'a, K, V, RV>( &mut self, key: K, value: V, seconds: u64, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Set the value and expiration of a key. Redis Docs
§

fn pset_ex<'a, K, V, RV>( &mut self, key: K, value: V, milliseconds: u64, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Set the value and expiration in milliseconds of a key. Redis Docs
§

fn set_nx<'a, K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Set the value of a key, only if the key does not exist Redis Docs
§

fn mset_nx<'a, K, V, RV>( &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. Redis Docs
§

fn mset_ex<'a, K, V, RV>( &mut self, items: &'a [(K, V)], options: MSetOptions, ) -> Result<RV, RedisError>
where K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue,

Sets the given keys to their respective values. This command is an extension of the MSETNX that adds expiration and XX options. Redis Docs
§

fn getset<'a, K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Set the string value of a key and return its old value. Redis Docs
§

fn getrange<'a, K, RV>( &mut self, key: K, from: isize, to: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, 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. Redis returns an empty string if the key doesn’t exist, not Nil Redis Docs
§

fn setrange<'a, K, V, RV>( &mut self, key: K, offset: isize, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Overwrite the part of the value stored in key at the specified offset. Redis Docs
§

fn del<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Delete one or more keys. Returns the number of keys deleted. Redis Docs
§

fn del_ex<'a, K, RV>( &mut self, key: K, value_comparison: ValueComparison, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Conditionally removes the specified key. A key is ignored if it does not exist. IFEQ match-value - Delete the key only if its value is equal to match-value IFNE match-value - Delete the key only if its value is not equal to match-value IFDEQ match-digest - Delete the key only if the digest of its value is equal to match-digest IFDNE match-digest - Delete the key only if the digest of its value is not equal to match-digest Redis Docs
§

fn digest<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the hex signature of the value stored in the specified key. For the digest, Redis will use XXH3 Redis Docs
§

fn exists<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Determine if a key exists. Redis Docs
§

fn key_type<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Determine the type of key. Redis Docs
§

fn expire<'a, K, RV>(&mut self, key: K, seconds: i64) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Set a key’s time to live in seconds. Returns whether expiration was set. Redis Docs
§

fn expire_at<'a, K, RV>(&mut self, key: K, ts: i64) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Set the expiration for a key as a UNIX timestamp. Returns whether expiration was set. Redis Docs
§

fn pexpire<'a, K, RV>(&mut self, key: K, ms: i64) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Set a key’s time to live in milliseconds. Returns whether expiration was set. Redis Docs
§

fn pexpire_at<'a, K, RV>(&mut self, key: K, ts: i64) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Set the expiration for a key as a UNIX timestamp in milliseconds. Returns whether expiration was set. Redis Docs
§

fn expire_time<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the absolute Unix expiration timestamp in seconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn pexpire_time<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the absolute Unix expiration timestamp in milliseconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn persist<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Remove the expiration from a key. Returns whether a timeout was removed. Redis Docs
§

fn ttl<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the time to live for a key in seconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn pttl<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the time to live for a key in milliseconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn get_ex<'a, K, RV>( &mut self, key: K, expire_at: Expiry, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the value of a key and set expiration Redis Docs
§

fn get_del<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the value of a key and delete it Redis Docs
§

fn copy<'a, KSrc, KDst, Db, RV>( &mut self, source: KSrc, destination: KDst, options: CopyOptions<Db>, ) -> Result<RV, RedisError>
where KSrc: ToSingleRedisArg, KDst: ToSingleRedisArg, Db: ToString, RV: FromRedisValue,

Copy the value from one key to another, returning whether the copy was successful. Redis Docs
§

fn rename<'a, K, N, RV>(&mut self, key: K, new_key: N) -> Result<RV, RedisError>
where K: ToSingleRedisArg, N: ToSingleRedisArg, RV: FromRedisValue,

Rename a key. Errors if key does not exist. Redis Docs
§

fn rename_nx<'a, K, N, RV>( &mut self, key: K, new_key: N, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, N: ToSingleRedisArg, RV: FromRedisValue,

Rename a key, only if the new key does not exist. Errors if key does not exist. Returns whether the key was renamed, or false if the new key already exists. Redis Docs
Unlink one or more keys. This is a non-blocking version of DEL. Returns number of keys unlinked. Redis Docs
§

fn append<'a, K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Append a value to a key. Returns length of string after operation. Redis Docs
§

fn incr<'a, K, V, RV>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Increment the numeric value of a key by the given amount. This issues a INCRBY or INCRBYFLOAT depending on the type. If the key does not exist, it is set to 0 before performing the operation.
§

fn decr<'a, K, V, RV>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Decrement the numeric value of a key by the given amount. If the key does not exist, it is set to 0 before performing the operation. Redis Docs
§

fn increx<'a, K, V, RV>( &mut self, key: K, increment: V, options: IncrexOptions<V>, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Increment the numeric value of a key by the given amount and set its expiration. Read more
§

fn setbit<'a, K, RV>( &mut self, key: K, offset: usize, value: bool, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Sets or clears the bit at offset in the string value stored at key. Returns the original bit value stored at offset. Redis Docs
§

fn getbit<'a, K, RV>(&mut self, key: K, offset: usize) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns the bit value at offset in the string value stored at key. Redis Docs
§

fn bitcount<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Count set bits in a string. Returns 0 if key does not exist. Redis Docs
§

fn bitcount_range<'a, K, RV>( &mut self, key: K, start: usize, end: usize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Count set bits in a string in a range. Returns 0 if key does not exist. Redis Docs
§

fn bit_and<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

Perform a bitwise AND between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_or<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

Perform a bitwise OR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_xor<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

Perform a bitwise XOR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_not<'a, D, S, RV>( &mut self, dstkey: D, srckey: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToSingleRedisArg, RV: FromRedisValue,

Perform a bitwise NOT of the key (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_diff<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

DIFF(X, Y1, Y2, …)
Perform a set difference to extract the members of X that are not members of any of Y1, Y2,….
Logical representation: X ∧ ¬(Y1 ∨ Y2 ∨ …)
Redis Docs
§

fn bit_diff1<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

DIFF1(X, Y1, Y2, …) (Relative complement difference)
Perform a relative complement set difference to extract the members of one or more of Y1, Y2,… that are not members of X.
Logical representation: ¬X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
§

fn bit_and_or<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

ANDOR(X, Y1, Y2, …)
Perform an “intersection of union(s)” operation to extract the members of X that are also members of one or more of Y1, Y2,….
Logical representation: X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
§

fn bit_one<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

ONE(X, Y1, Y2, …)
Perform an “exclusive membership” operation to extract the members of exactly one of X, Y1, Y2, ….
Logical representation: (X ∨ Y1 ∨ Y2 ∨ …) ∧ ¬((X ∧ Y1) ∨ (X ∧ Y2) ∨ (Y1 ∧ Y2) ∨ (Y1 ∧ Y3) ∨ …)
Redis Docs
§

fn strlen<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the length of the value stored in a key. 0 if key does not exist. Redis Docs
§

fn hget<'a, K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToSingleRedisArg, RV: FromRedisValue,

Gets a single (or multiple) fields from a hash.
§

fn hmget<'a, K, F, RV>(&mut self, key: K, fields: F) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Gets multiple fields from a hash. Redis Docs
§

fn hget_ex<'a, K, F, RV>( &mut self, key: K, fields: F, expire_at: Expiry, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Get the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
§

fn hdel<'a, K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Deletes a single (or multiple) fields from a hash. Returns number of fields deleted. Redis Docs
§

fn hget_del<'a, K, F, RV>( &mut self, key: K, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Get and delete the value of one or more fields of a given hash key Redis Docs
§

fn hset<'a, K, F, V, RV>( &mut self, key: K, field: F, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Sets a single field in a hash. Returns number of fields added. Redis Docs
§

fn hset_ex<'a, K, F, V, RV>( &mut self, key: K, hash_field_expiration_options: &'a HashFieldExpirationOptions, fields_values: &'a [(F, V)], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue,

Set the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
§

fn hset_nx<'a, K, F, V, RV>( &mut self, key: K, field: F, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Sets a single field in a hash if it does not exist. Returns whether the field was added. Redis Docs
§

fn hset_multiple<'a, K, F, V, RV>( &mut self, key: K, items: &'a [(F, V)], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue,

Sets multiple fields in a hash. Redis Docs
§

fn hincr<'a, K, F, D, RV>( &mut self, key: K, field: F, delta: D, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue,

Increments a value. Returns the new value of the field after incrementation.
§

fn hexists<'a, K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToSingleRedisArg, RV: FromRedisValue,

Checks if a field in a hash exists. Redis Docs
§

fn httl<'a, K, F, RV>(&mut self, key: K, fields: F) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Get one or more fields’ TTL in seconds. Redis Docs
§

fn hpttl<'a, K, F, RV>(&mut self, key: K, fields: F) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Get one or more fields’ TTL in milliseconds. Redis Docs
§

fn hexpire<'a, K, F, RV>( &mut self, key: K, seconds: i64, opt: ExpireOption, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Set one or more fields’ time to live in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
§

fn hexpire_at<'a, K, F, RV>( &mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Set the expiration for one or more fields as a UNIX timestamp in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
§

fn hexpire_time<'a, K, F, RV>( &mut self, key: K, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
§

fn hpersist<'a, K, F, RV>( &mut self, key: K, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Remove the expiration from a key. Returns 1 if the expiration was removed. Redis Docs
§

fn hpexpire<'a, K, F, RV>( &mut self, key: K, milliseconds: i64, opt: ExpireOption, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Set one or more fields’ time to live in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
§

fn hpexpire_at<'a, K, F, RV>( &mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Set the expiration for one or more fields as a UNIX timestamp in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
§

fn hpexpire_time<'a, K, F, RV>( &mut self, key: K, fields: F, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue,

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
§

fn hkeys<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Gets all the keys in a hash. Redis Docs
§

fn hvals<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Gets all the values in a hash. Redis Docs
§

fn hgetall<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Gets all the fields and values in a hash. Redis Docs
§

fn hlen<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Gets the length of a hash. Returns 0 if key does not exist. Redis Docs
§

fn blmove<'a, S, D, RV>( &mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, timeout: f64, ) -> Result<RV, RedisError>
where S: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue,

Pop an element from a list, push it to another list and return it; or block until one is available Redis Docs
§

fn blmpop<'a, K, RV>( &mut self, timeout: f64, 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. Redis Docs
§

fn blpop<'a, K, RV>(&mut self, key: K, timeout: f64) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Remove and get the first element in a list, or block until one is available. Redis Docs
§

fn brpop<'a, K, RV>(&mut self, key: K, timeout: f64) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Remove and get the last element in a list, or block until one is available. Redis Docs
§

fn brpoplpush<'a, S, D, RV>( &mut self, srckey: S, dstkey: D, timeout: f64, ) -> Result<RV, RedisError>
where S: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue,

Pop a value from a list, push it to another list and return it; or block until one is available. Redis Docs
§

fn lindex<'a, K, RV>(&mut self, key: K, index: isize) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get an element from a list by its index. Redis Docs
§

fn linsert_before<'a, K, P, V, RV>( &mut self, key: K, pivot: P, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Insert an element before another element in a list. Redis Docs
§

fn linsert_after<'a, K, P, V, RV>( &mut self, key: K, pivot: P, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Insert an element after another element in a list. Redis Docs
§

fn llen<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns the length of the list stored at key. Redis Docs
§

fn lmove<'a, S, D, RV>( &mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, ) -> Result<RV, RedisError>
where S: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue,

Pop an element a list, push it to another list and return it Redis Docs
§

fn lmpop<'a, K, RV>( &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. Redis Docs
§

fn lpop<'a, K, RV>( &mut self, key: K, count: Option<NonZero<usize>>, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Removes and returns the up to count first elements of the list stored at key. Read more
§

fn lpos<'a, K, V, RV>( &mut self, key: K, value: V, options: LposOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Returns the index of the first matching value of the list stored at key. Redis Docs
§

fn lpush<'a, K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToRedisArgs, RV: FromRedisValue,

Insert all the specified values at the head of the list stored at key. Redis Docs
§

fn lpush_exists<'a, K, V, RV>( &mut self, key: K, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, 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. Redis Docs
§

fn lrange<'a, K, RV>( &mut self, key: K, start: isize, stop: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns the specified elements of the list stored at key. Redis Docs
§

fn lrem<'a, K, V, RV>( &mut self, key: K, count: isize, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Removes the first count occurrences of elements equal to value from the list stored at key. Redis Docs
§

fn ltrim<'a, K, RV>( &mut self, key: K, start: isize, stop: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Trim an existing list so that it will contain only the specified range of elements specified. Redis Docs
§

fn lset<'a, K, V, RV>( &mut self, key: K, index: isize, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue,

Sets the list element at index to value Redis Docs
§

fn ping<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Sends a ping to the server Redis Docs
§

fn ping_message<'a, K, RV>(&mut self, message: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Sends a ping with a message to the server Redis Docs
§

fn rpop<'a, K, RV>( &mut self, key: K, count: Option<NonZero<usize>>, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Removes and returns the up to count last elements of the list stored at key Read more
§

fn rpoplpush<'a, K, D, RV>( &mut self, key: K, dstkey: D, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue,

Pop a value from a list, push it to another list and return it. Redis Docs
§

fn rpush<'a, K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToRedisArgs, RV: FromRedisValue,

Insert all the specified values at the tail of the list stored at key. Redis Docs
§

fn rpush_exists<'a, K, V, RV>( &mut self, key: K, value: V, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, V: ToRedisArgs, RV: FromRedisValue,

Inserts value at the tail of the list stored at key, only if key already exists and holds a list. Redis Docs
§

fn sadd<'a, K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue,

Add one or more members to a set. Redis Docs
§

fn scard<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the number of members in a set. Redis Docs
§

fn sdiff<'a, K, RV>(&mut self, keys: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Subtract multiple sets. Redis Docs
§

fn sdiffstore<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Subtract multiple sets and store the resulting set in a key. Redis Docs
§

fn sinter<'a, K, RV>(&mut self, keys: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Intersect multiple sets. Redis Docs
§

fn sinterstore<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Intersect multiple sets and store the resulting set in a key. Redis Docs
§

fn sismember<'a, K, M, RV>( &mut self, key: K, member: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Determine if a given value is a member of a set. Redis Docs
§

fn smismember<'a, K, M, RV>( &mut self, key: K, members: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue,

Determine if given values are members of a set. Redis Docs
§

fn smembers<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get all the members in a set. Redis Docs
§

fn smove<'a, S, D, M, RV>( &mut self, srckey: S, dstkey: D, member: M, ) -> Result<RV, RedisError>
where S: ToSingleRedisArg, D: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Move a member from one set to another. Redis Docs
§

fn spop<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Remove and return a random member from a set. Redis Docs
§

fn srandmember<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get one random member from a set. Redis Docs
§

fn srandmember_multiple<'a, K, RV>( &mut self, key: K, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get multiple random members from a set. Redis Docs
§

fn srem<'a, K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue,

Remove one or more members from a set. Redis Docs
§

fn sunion<'a, K, RV>(&mut self, keys: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Add multiple sets. Redis Docs
§

fn sunionstore<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Add multiple sets and store the resulting set in a key. Redis Docs
§

fn zadd<'a, K, S, M, RV>( &mut self, key: K, member: M, score: S, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, S: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Add one member to a sorted set, or update its score if it already exists. Redis Docs
§

fn zadd_multiple<'a, K, S, M, RV>( &mut self, key: K, items: &'a [(S, M)], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, S: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue,

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
§

fn zadd_options<'a, K, S, M, RV>( &mut self, key: K, member: M, score: S, options: &'a SortedSetAddOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, S: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Add one member to a sorted set, or update its score if it already exists. Redis Docs
§

fn zadd_multiple_options<'a, K, S, M, RV>( &mut self, key: K, items: &'a [(S, M)], options: &'a SortedSetAddOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, S: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue,

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
§

fn zcard<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Get the number of members in a sorted set. Redis Docs
§

fn zcount<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Count the members in a sorted set with scores within the given values. Redis Docs
§

fn zincr<'a, K, M, D, RV>( &mut self, key: K, member: M, delta: D, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, D: ToSingleRedisArg, 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. Redis Docs
§

fn zinterstore<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Intersect multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
§

fn zinterstore_min<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Intersect multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
§

fn zinterstore_max<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Intersect multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
§

fn zinterstore_weights<'a, D, K, W, RV>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, 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. Redis Docs
§

fn zinterstore_min_weights<'a, D, K, W, RV>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, 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. Redis Docs
§

fn zinterstore_max_weights<'a, D, K, W, RV>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, 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. Redis Docs
§

fn zlexcount<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Count the number of members in a sorted set between a given lexicographical range. Redis Docs
§

fn bzpopmax<'a, K, RV>( &mut self, key: K, timeout: f64, ) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Removes and returns the member with the highest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
§

fn zpopmax<'a, K, RV>(&mut self, key: K, count: isize) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Removes and returns up to count members with the highest scores in a sorted set Redis Docs
§

fn bzpopmin<'a, K, RV>( &mut self, key: K, timeout: f64, ) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Removes and returns the member with the lowest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
§

fn zpopmin<'a, K, RV>(&mut self, key: K, count: isize) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Removes and returns up to count members with the lowest scores in a sorted set Redis Docs
§

fn bzmpop_max<'a, K, RV>( &mut self, timeout: f64, keys: 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. Blocks until a member is available otherwise. Redis Docs
§

fn zmpop_max<'a, K, RV>( &mut self, keys: 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. Redis Docs
§

fn bzmpop_min<'a, K, RV>( &mut self, timeout: f64, keys: 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. Blocks until a member is available otherwise. Redis Docs
§

fn zmpop_min<'a, K, RV>( &mut self, keys: 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. Redis Docs
§

fn zrandmember<'a, K, RV>( &mut self, key: K, count: Option<isize>, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Return up to count random members in a sorted set (or 1 if count == None) Redis Docs
§

fn zrandmember_withscores<'a, K, RV>( &mut self, key: K, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Return up to count random members in a sorted set with scores Redis Docs
§

fn zrange<'a, K, RV>( &mut self, key: K, start: isize, stop: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by index Redis Docs
§

fn zrange_withscores<'a, K, RV>( &mut self, key: K, start: isize, stop: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by index with scores. Redis Docs
§

fn zrangebylex<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by lexicographical range. Redis Docs
§

fn zrangebylex_limit<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
§

fn zrevrangebylex<'a, K, MM, M, RV>( &mut self, key: K, max: MM, min: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by lexicographical range. Redis Docs
§

fn zrevrangebylex_limit<'a, K, MM, M, RV>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
§

fn zrangebyscore<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score. Redis Docs
§

fn zrangebyscore_withscores<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score with scores. Redis Docs
§

fn zrangebyscore_limit<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score with limit. Redis Docs
§

fn zrangebyscore_limit_withscores<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
§

fn zrank<'a, K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Determine the index of a member in a sorted set. Redis Docs
§

fn zrem<'a, K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue,

Remove one or more members from a sorted set. Redis Docs
§

fn zrembylex<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Remove all members in a sorted set between the given lexicographical range. Redis Docs
§

fn zremrangebyrank<'a, K, RV>( &mut self, key: K, start: isize, stop: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Remove all members in a sorted set within the given indexes. Redis Docs
§

fn zrembyscore<'a, K, M, MM, RV>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue,

Remove all members in a sorted set within the given scores. Redis Docs
§

fn zrevrange<'a, K, RV>( &mut self, key: K, start: isize, stop: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by index, ordered from high to low. Redis Docs
§

fn zrevrange_withscores<'a, K, RV>( &mut self, key: K, start: isize, stop: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by index, with scores ordered from high to low. Redis Docs
§

fn zrevrangebyscore<'a, K, MM, M, RV>( &mut self, key: K, max: MM, min: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score. Redis Docs
§

fn zrevrangebyscore_withscores<'a, K, MM, M, RV>( &mut self, key: K, max: MM, min: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score with scores. Redis Docs
§

fn zrevrangebyscore_limit<'a, K, MM, M, RV>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score with limit. Redis Docs
§

fn zrevrangebyscore_limit_withscores<'a, K, MM, M, RV>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
§

fn zrevrank<'a, K, M, RV>( &mut self, key: K, member: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Determine the index of a member in a sorted set, with scores ordered from high to low. Redis Docs
§

fn zscore<'a, K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Get the score associated with the given member in a sorted set. Redis Docs
§

fn zscore_multiple<'a, K, M, RV>( &mut self, key: K, members: &'a [M], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue,

Get the scores associated with multiple members in a sorted set. Redis Docs
§

fn zunionstore<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Unions multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
§

fn zunionstore_min<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Unions multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
§

fn zunionstore_max<'a, D, K, RV>( &mut self, dstkey: D, keys: K, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue,

Unions multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
§

fn zunionstore_weights<'a, D, K, W, RV>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, 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. Redis Docs
§

fn zunionstore_min_weights<'a, D, K, W, RV>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, 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. Redis Docs
§

fn zunionstore_max_weights<'a, D, K, W, RV>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, 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. Redis Docs
§

fn pfadd<'a, K, E, RV>(&mut self, key: K, element: E) -> Result<RV, RedisError>
where K: ToSingleRedisArg, E: ToRedisArgs, RV: FromRedisValue,

Adds the specified elements to the specified HyperLogLog. Redis Docs
§

fn pfcount<'a, K, RV>(&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). Redis Docs
§

fn pfmerge<'a, D, S, RV>( &mut self, dstkey: D, srckeys: S, ) -> Result<RV, RedisError>
where D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue,

Merge N different HyperLogLogs into a single one. Redis Docs
§

fn publish<'a, K, E, RV>( &mut self, channel: K, message: E, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, E: ToSingleRedisArg, RV: FromRedisValue,

Posts a message to the given channel. Redis Docs
§

fn spublish<'a, K, E, RV>( &mut self, channel: K, message: E, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, E: ToSingleRedisArg, RV: FromRedisValue,

Posts a message to the given sharded channel. Redis Docs
§

fn object_encoding<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns the encoding of a key. Redis Docs
§

fn object_idletime<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns the time in seconds since the last access of a key. Redis Docs
§

fn object_freq<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns the logarithmic access frequency counter of a key. Redis Docs
§

fn object_refcount<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns the reference count of a key. Redis Docs
§

fn client_getname<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Returns the name of the current connection as set by CLIENT SETNAME. Redis Docs
§

fn client_id<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Returns the ID of the current connection. Redis Docs
§

fn client_setname<'a, K, RV>( &mut self, connection_name: K, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Command assigns a name to the current connection. Redis Docs
§

fn acl_load<'a, RV>(&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. Redis Docs
§

fn acl_save<'a, RV>(&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. Redis Docs
§

fn acl_list<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Shows the currently active ACL rules in the Redis server. Redis Docs
§

fn acl_users<'a, RV>(&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. Redis Docs
§

fn acl_getuser<'a, K, RV>(&mut self, username: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Returns all the rules defined for an existing ACL user. Redis Docs
§

fn acl_setuser<'a, K, RV>(&mut self, username: K) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Creates an ACL user without any privilege. Redis Docs
§

fn acl_setuser_rules<'a, K, RV>( &mut self, username: K, rules: &'a [Rule], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Creates an ACL user with the specified rules or modify the rules of an existing user. Redis Docs
§

fn acl_deluser<'a, K, RV>( &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. Redis Docs
§

fn acl_dryrun<'a, K, C, A, RV>( &mut self, username: K, command: C, args: A, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, C: ToSingleRedisArg, A: ToRedisArgs, RV: FromRedisValue,

Simulate the execution of a given command by a given user. Redis Docs
§

fn acl_cat<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Shows the available ACL categories. Redis Docs
§

fn acl_cat_categoryname<'a, K, RV>( &mut self, categoryname: K, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Shows all the Redis commands in the specified category. Redis Docs
§

fn acl_genpass<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Generates a 256-bits password starting from /dev/urandom if available. Redis Docs
§

fn acl_genpass_bits<'a, RV>(&mut self, bits: isize) -> Result<RV, RedisError>
where RV: FromRedisValue,

Generates a 1-to-1024-bits password starting from /dev/urandom if available. Redis Docs
§

fn acl_whoami<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Returns the username the current connection is authenticated with. Redis Docs
§

fn acl_log<'a, RV>(&mut self, count: isize) -> Result<RV, RedisError>
where RV: FromRedisValue,

Shows a list of recent ACL security events Redis Docs
§

fn acl_log_reset<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Clears the ACL log. Redis Docs
§

fn acl_help<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Returns a helpful text describing the different subcommands. Redis Docs
§

fn geo_add<'a, K, M, RV>( &mut self, key: K, members: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue,

Adds the specified geospatial items to the specified key. Read more
§

fn geo_dist<'a, K, M1, M2, RV>( &mut self, key: K, member1: M1, member2: M2, unit: Unit, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M1: ToSingleRedisArg, M2: ToSingleRedisArg, RV: FromRedisValue,

Return the distance between two members in the geospatial index represented by the sorted set. Read more
§

fn geo_hash<'a, K, M, RV>( &mut self, key: K, members: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue,

Return valid Geohash strings representing the position of one or more members of the geospatial index represented by the sorted set at key. Read more
§

fn geo_pos<'a, K, M, RV>( &mut self, key: K, members: M, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, 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
§

fn geo_radius<'a, K, RV>( &mut self, key: K, longitude: f64, latitude: f64, radius: f64, unit: Unit, options: RadiusOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Return the members of a sorted set populated with geospatial information using geo_add, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). Read more
§

fn geo_radius_by_member<'a, K, M, RV>( &mut self, key: K, member: M, radius: f64, unit: Unit, options: RadiusOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue,

Retrieve members selected by distance with the center of member. The member itself is always contained in the results. Redis Docs
§

fn xack<'a, K, G, I, RV>( &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
§

fn xnack<'a, K, G, ID, RV>( &mut self, key: K, group: G, ids: &'a [ID], options: &'a StreamNackOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, G: ToSingleRedisArg, ID: ToSingleRedisArg, RV: FromRedisValue,

Negatively acknowledge (NACK) one or more pending stream messages. Read more
§

fn xadd<'a, K, ID, F, V, RV>( &mut self, key: K, id: ID, items: &'a [(F, V)], ) -> Result<RV, RedisError>
where K: ToRedisArgs, ID: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue,

Add a stream message by key. Use * as the id for the current timestamp. Read more
§

fn xadd_map<'a, K, ID, BTM, RV>( &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 more
§

fn xadd_options<'a, K, ID, I, RV>( &mut self, key: K, id: ID, items: I, options: &'a StreamAddOptions, ) -> Result<RV, RedisError>
where K: ToRedisArgs, ID: ToRedisArgs, I: ToRedisArgs, RV: FromRedisValue,

Add a stream message with options. Read more
§

fn xadd_maxlen<'a, K, ID, F, V, RV>( &mut self, key: K, maxlen: StreamMaxlen, id: ID, items: &'a [(F, V)], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, ID: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue,

Add a stream message while capping the stream at a maxlength. Read more
§

fn xadd_maxlen_map<'a, K, ID, BTM, RV>( &mut self, key: K, maxlen: StreamMaxlen, id: ID, map: BTM, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, ID: ToRedisArgs, BTM: ToRedisArgs, RV: FromRedisValue,

BTreeMap variant for adding a stream message while capping the stream at a maxlength. Read more
§

fn xautoclaim_options<'a, K, G, C, MIT, S, RV>( &mut self, key: K, group: G, consumer: C, min_idle_time: MIT, start: S, options: StreamAutoClaimOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, G: ToRedisArgs, C: ToRedisArgs, MIT: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue,

Perform a combined xpending and xclaim flow. Read more
§

fn xclaim<'a, K, G, C, MIT, ID, RV>( &mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, 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
§

fn xclaim_options<'a, K, G, C, MIT, ID, RV>( &mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], options: StreamClaimOptions, ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, 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
§

fn xdel<'a, K, ID, RV>( &mut self, key: K, ids: &'a [ID], ) -> Result<RV, RedisError>
where K: ToSingleRedisArg, ID: ToRedisArgs, RV: FromRedisValue,

Deletes a list of ids for a given stream key. Read more
§

fn xdel_ex<'a, K, ID, RV>( &mut self, key: K, ids: &'a [ID], options: StreamDeletionPolicy, ) -> Result<RV, RedisError>
where K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue,

An extension of the Streams XDEL command that provides finer control over how message entries are deleted with respect to consumer groups.
§

fn xack_del<'a, K, G, ID, RV>( &mut self, key: K, group: G, ids: &'a [ID], options: StreamDeletionPolicy, ) -> Result<RV, RedisError>
where K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue,

A combination of XACK and XDEL that acknowledges and attempts to delete a list of ids for a given stream key and consumer group.
§

fn xgroup_create<'a, K, G, ID, RV>( &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 more
§

fn xgroup_createconsumer<'a, K, G, C, RV>( &mut self, key: K, group: G, consumer: C, ) -> Result<RV, RedisError>
where K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue,

This creates a consumer explicitly (vs implicit via XREADGROUP) for given stream `key. Read more
§

fn xgroup_create_mkstream<'a, K, G, ID, RV>( &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 more
§

fn xgroup_setid<'a, K, G, ID, RV>( &mut self, key: K, group: G, id: ID, ) -> Result<RV, RedisError>
where K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue,

Alter which id you want consumers to begin reading from an existing consumer group. Read more
§

fn xgroup_destroy<'a, K, G, RV>( &mut self, key: K, group: G, ) -> Result<RV, RedisError>
where K: ToRedisArgs, G: ToRedisArgs, RV: FromRedisValue,

Destroy an existing consumer group for a given stream key Read more
§

fn xgroup_delconsumer<'a, K, G, C, RV>( &mut self, key: K, group: G, consumer: C, ) -> Result<RV, RedisError>
where K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue,

This deletes a consumer from an existing consumer group for given stream `key. Read more
§

fn xinfo_consumers<'a, K, G, RV>( &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 more
§

fn xinfo_groups<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Returns all consumer groups created for a given stream key. Take note of the StreamInfoGroupsReply return type. Read more
§

fn xinfo_stream<'a, K, RV>(&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 more
§

fn xinfo_stream_with_idempotency<'a, K, RV>( &mut self, key: K, ) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Returns stream info with idempotency tracking statistics (Redis 8.6+). Read more
§

fn xlen<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Returns the number of messages for a given stream key. Read more
§

fn xpending<'a, K, G, RV>(&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 more
§

fn xpending_count<'a, K, G, S, E, C, RV>( &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
§

fn xpending_consumer_count<'a, K, G, S, E, C, CN, RV>( &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,

An alternate version of xpending_count which filters by consumer name. Read more
§

fn xrange<'a, K, S, E, RV>( &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 more
§

fn xrange_all<'a, K, RV>(&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 more
§

fn xrange_count<'a, K, S, E, C, RV>( &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 more
§

fn xread<'a, K, ID, RV>( &mut self, keys: &'a [K], ids: &'a [ID], ) -> Result<RV, RedisError>
where K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue,

Read a list of ids 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 more
§

fn xread_options<'a, K, ID, RV>( &mut self, keys: &'a [K], ids: &'a [ID], options: &'a StreamReadOptions, ) -> Result<RV, RedisError>
where K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue,

This method handles setting optional arguments for XREAD or XREADGROUP Redis commands. Read more
§

fn xrevrange<'a, K, E, S, RV>( &mut self, key: K, end: E, start: S, ) -> Result<RV, RedisError>
where K: ToRedisArgs, E: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue,

This is the reverse version of xrange. The same rules apply for start and end here. Read more
§

fn xrevrange_all<'a, K, RV>(&mut self, key: K) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

This is the reverse version of xrange_all. The same rules apply for start and end here. Read more
§

fn xrevrange_count<'a, K, E, S, C, RV>( &mut self, key: K, end: E, start: S, count: C, ) -> Result<RV, RedisError>
where K: ToRedisArgs, E: ToRedisArgs, S: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue,

This is the reverse version of xrange_count. The same rules apply for start and end here. Read more
§

fn xtrim<'a, K, RV>( &mut self, key: K, maxlen: StreamMaxlen, ) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Trim a stream key to a MAXLEN count. Read more
§

fn xtrim_options<'a, K, RV>( &mut self, key: K, options: &'a StreamTrimOptions, ) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Trim a stream key with full options Read more
§

fn xcfgset<'a, K, RV>( &mut self, key: K, options: &'a StreamConfigOptions, ) -> Result<RV, RedisError>
where K: ToRedisArgs, RV: FromRedisValue,

Configure idempotency parameters for a stream Read more
§

fn load_script<'a, RV>(&mut self, script: &'a Script) -> Result<RV, RedisError>
where RV: FromRedisValue,

Load a script. Read more
§

fn invoke_script<'a, RV>( &mut self, invocation: &'a ScriptInvocation<'a>, ) -> Result<RV, RedisError>
where RV: FromRedisValue,

Invoke a prepared script. Read more
§

fn flushall<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Deletes all the keys of all databases Read more
§

fn flushall_options<'a, RV>( &mut self, options: &'a FlushAllOptions, ) -> Result<RV, RedisError>
where RV: FromRedisValue,

Deletes all the keys of all databases with options Read more
§

fn flushdb<'a, RV>(&mut self) -> Result<RV, RedisError>
where RV: FromRedisValue,

Deletes all the keys of the current database Read more
§

fn flushdb_options<'a, RV>( &mut self, options: &'a FlushAllOptions, ) -> Result<RV, RedisError>
where RV: FromRedisValue,

Deletes all the keys of the current database with options Read more
§

fn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError>
where RV: FromRedisValue,

Incrementally iterate the keys space.
§

fn scan_options<RV>( &mut self, opts: ScanOptions, ) -> Result<Iter<'_, RV>, RedisError>
where RV: FromRedisValue,

Incrementally iterate the keys space with options.
§

fn scan_match<P, RV>(&mut self, pattern: P) -> Result<Iter<'_, RV>, RedisError>
where P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate the keys space for keys matching a pattern.
§

fn hscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate hash fields and associated values.
§

fn hscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate hash fields and associated values for field names matching a pattern.
§

fn sscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate set elements.
§

fn sscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate set elements for elements matching a pattern.
§

fn zscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate sorted set elements.
§

fn zscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate sorted set elements for elements matching a pattern.
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<C, T> ConnectionLike for T
where C: ConnectionLike, T: DerefMut<Target = C>,

§

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.
§

fn req_packed_commands( &mut self, cmd: &[u8], offset: usize, count: usize, ) -> Result<Vec<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.
§

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.
§

fn supports_pipelining(&self) -> bool

§

fn check_connection(&mut self) -> bool

Check that all connections it has are available (PING internally).
§

fn is_open(&self) -> bool

Returns the connection status. Read more
§

impl<R> CryptoRng for R
where R: TryCryptoRng<Error = Infallible> + ?Sized,

Source§

impl<T> CryptoRng for T
where T: DerefMut, <T as Deref>::Target: CryptoRng,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T, A> DynAccess<T> for A
where A: Access<T>, <A as Access<T>>::Guard: 'static,

§

fn load(&self) -> DynGuard<T>

The equivalent of [Access::load].
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> Fmt for T
where T: Display,

§

fn fg<C>(self, color: C) -> Foreground<Self>
where C: Into<Option<Color>>, Self: Display,

Give this value the specified foreground colour.
§

fn bg<C>(self, color: C) -> Background<Self>
where C: Into<Option<Color>>, Self: Display,

Give this value the specified background colour.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FutureExt for T
where T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where F: FnOnce(Self::Output) -> U, Self: Sized,

Map this future’s output to a different type, returning a new future of the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where Self::Output: Into<U>, Self: Sized,

Map this future’s output to a different type, returning a new future of the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where F: FnOnce(Self::Output) -> Fut, Fut: Future, Self: Sized,

Chain on a computation for when a future finished, passing the result of the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where B: Future<Output = Self::Output>, Self: Sized,

Wrap this future in an Either future, making it the left-hand variant of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where A: Future<Output = Self::Output>, Self: Sized,

Wrap this future in an Either future, making it the right-hand variant of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where Self::Output: Future, Self: Sized,

Flatten the execution of this future when the output of this future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where Self::Output: Stream, Self: Sized,

Flatten the execution of this future when the successful result of this future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Fuse a future such that poll will never again be called once it has completed. This method can be used to turn any Future into a FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where F: FnOnce(&Self::Output), Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where Self: Sized + UnwindSafe,

Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where Self: Sized, Self::Output: Clone,

Create a cloneable handle to this future where all handles will resolve to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where Self: Sized,

Turn this future into a future that yields () on completion and sends its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where Self: Sized + Send + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where Self: Sized + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where Self: Sized,

Evaluates and consumes the future, returning the resulting output if the future is ready after the first call to Future::poll. Read more
§

impl<T> FutureExt for T
where T: Future + ?Sized,

§

fn with_cancellation_token( self, cancellation_token: &CancellationToken, ) -> WithCancellationTokenFuture<'_, Self>
where Self: Sized,

Similar to [CancellationToken::run_until_cancelled], but with the advantage that it is easier to write fluent call chains. Read more
§

fn with_cancellation_token_owned( self, cancellation_token: CancellationToken, ) -> WithCancellationTokenFutureOwned<Self>
where Self: Sized,

Similar to [CancellationToken::run_until_cancelled_owned], but with the advantage that it is easier to write fluent call chains. Read more
§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<I> IntoIterator for I
where I: Iterator,

Source§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = I

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

§

type Proj<U: 'src> = U

§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

Source§

impl<I> IteratorExt for I
where I: Iterator,

Source§

fn transpose_into_fallible<T, E>(self) -> Convert<I>
where I: Sized + Iterator<Item = Result<T, E>>,

Convert an iterator of Results into FallibleIterator by transposition

Source§

fn into_fallible<T>(self) -> IntoFallible<I>
where I: Sized + Iterator<Item = T>,

Convert an iterator of anything into FallibleIterator by wrapping into Result<T, Infallible> where Infallible is an error that can never actually happen.

§

impl<I> IteratorRandom for I
where I: Iterator,

§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element Read more
§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element (stable) Read more
§

fn sample_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a buffer Read more
§

fn sample<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a Vec Read more
§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

👎Deprecated since 0.10.0:

Renamed to sample_fill

Deprecated: use [Self::sample_fill] instead
§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

👎Deprecated since 0.10.0:

Renamed to sample

Deprecated: use [Self::sample] instead
Source§

impl<I> IteratorRandom for I
where I: Iterator,

Source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element Read more
Source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element (stable) Read more
Source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a buffer Read more
Source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a Vec Read more
Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,

§

impl<T> Paint for T
where T: ?Sized,

§

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 primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
§

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>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

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 bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
§

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 mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1:

renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
§

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);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
§

impl<I> PgBindIterExt for I
where I: Iterator,

§

fn bind_iter(self) -> PgBindIter<I>

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<R> ReadBytesExt for R
where R: Read + ?Sized,

§

fn read_u8(&mut self) -> Result<u8, Error>

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> Result<i8, Error>

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16<T>(&mut self) -> Result<u16, Error>
where T: ByteOrder,

Reads an unsigned 16 bit integer from the underlying reader. Read more
§

fn read_i16<T>(&mut self) -> Result<i16, Error>
where T: ByteOrder,

Reads a signed 16 bit integer from the underlying reader. Read more
§

fn read_u24<T>(&mut self) -> Result<u32, Error>
where T: ByteOrder,

Reads an unsigned 24 bit integer from the underlying reader. Read more
§

fn read_i24<T>(&mut self) -> Result<i32, Error>
where T: ByteOrder,

Reads a signed 24 bit integer from the underlying reader. Read more
§

fn read_u32<T>(&mut self) -> Result<u32, Error>
where T: ByteOrder,

Reads an unsigned 32 bit integer from the underlying reader. Read more
§

fn read_i32<T>(&mut self) -> Result<i32, Error>
where T: ByteOrder,

Reads a signed 32 bit integer from the underlying reader. Read more
§

fn read_u48<T>(&mut self) -> Result<u64, Error>
where T: ByteOrder,

Reads an unsigned 48 bit integer from the underlying reader. Read more
§

fn read_i48<T>(&mut self) -> Result<i64, Error>
where T: ByteOrder,

Reads a signed 48 bit integer from the underlying reader. Read more
§

fn read_u64<T>(&mut self) -> Result<u64, Error>
where T: ByteOrder,

Reads an unsigned 64 bit integer from the underlying reader. Read more
§

fn read_i64<T>(&mut self) -> Result<i64, Error>
where T: ByteOrder,

Reads a signed 64 bit integer from the underlying reader. Read more
§

fn read_u128<T>(&mut self) -> Result<u128, Error>
where T: ByteOrder,

Reads an unsigned 128 bit integer from the underlying reader. Read more
§

fn read_i128<T>(&mut self) -> Result<i128, Error>
where T: ByteOrder,

Reads a signed 128 bit integer from the underlying reader. Read more
§

fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>
where T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader. Read more
§

fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>
where T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader. Read more
§

fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>
where T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader.
§

fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>
where T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader.
§

fn read_f32<T>(&mut self) -> Result<f32, Error>
where T: ByteOrder,

Reads a IEEE754 single-precision (4 bytes) floating point number from the underlying reader. Read more
§

fn read_f64<T>(&mut self) -> Result<f64, Error>
where T: ByteOrder,

Reads a IEEE754 double-precision (8 bytes) floating point number from the underlying reader. Read more
§

fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of unsigned 16 bit integers from the underlying reader. Read more
§

fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of unsigned 32 bit integers from the underlying reader. Read more
§

fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of unsigned 64 bit integers from the underlying reader. Read more
§

fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of unsigned 128 bit integers from the underlying reader. Read more
§

fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>

Reads a sequence of signed 8 bit integers from the underlying reader. Read more
§

fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of signed 16 bit integers from the underlying reader. Read more
§

fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of signed 32 bit integers from the underlying reader. Read more
§

fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of signed 64 bit integers from the underlying reader. Read more
§

fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of signed 128 bit integers from the underlying reader. Read more
§

fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of IEEE754 single-precision (4 bytes) floating point numbers from the underlying reader. Read more
§

fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>
where T: ByteOrder,

👎Deprecated since 1.2.0:

please use read_f32_into instead

DEPRECATED. Read more
§

fn read_f64_into<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where T: ByteOrder,

Reads a sequence of IEEE754 double-precision (8 bytes) floating point numbers from the underlying reader. Read more
§

fn read_f64_into_unchecked<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where T: ByteOrder,

👎Deprecated since 1.2.0:

please use read_f64_into instead

DEPRECATED. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
§

impl<R> Rng for R
where R: TryRng<Error = Infallible> + ?Sized,

§

fn next_u32(&mut self) -> u32

Return the next random u32.
§

fn next_u64(&mut self) -> u64

Return the next random u64.
§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
Source§

impl<R> Rng for R
where R: RngCore + ?Sized,

Source§

fn random<T>(&mut self) -> T

Return a random value via the StandardUniform distribution. Read more
Source§

fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>

Return an iterator over random variates Read more
Source§

fn random_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

Generate a random value in the given range. Read more
Source§

fn random_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
Source§

fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being true. Read more
Source§

fn sample<T, D>(&mut self, distr: D) -> T
where D: Distribution<T>,

Sample a new value, using the given distribution. Read more
Source§

fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>
where D: Distribution<T>, Self: Sized,

Create an iterator that generates values using the given distribution. Read more
Source§

fn fill<T>(&mut self, dest: &mut T)
where T: Fill + ?Sized,

Fill any type implementing Fill with random data Read more
Source§

fn gen<T>(&mut self) -> T

👎Deprecated since 0.9.0:

Renamed to random to avoid conflict with the new gen keyword in Rust 2024.

Alias for Rng::random.
Source§

fn gen_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

👎Deprecated since 0.9.0:

Renamed to random_range

Source§

fn gen_bool(&mut self, p: f64) -> bool

👎Deprecated since 0.9.0:

Renamed to random_bool

Alias for Rng::random_bool.
Source§

fn gen_ratio(&mut self, numerator: u32, denominator: u32) -> bool

👎Deprecated since 0.9.0:

Renamed to random_ratio

§

impl<R> RngCore for R
where R: Rng,

Source§

impl<T> RngCore for T
where T: DerefMut, <T as Deref>::Target: RngCore,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
§

impl<R> RngExt for R
where R: Rng + ?Sized,

§

fn random<T>(&mut self) -> T
where StandardUniform: Distribution<T>,

Return a random value via the StandardUniform distribution. Read more
§

fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
where Self: Sized, StandardUniform: Distribution<T>,

Return an iterator over random variates Read more
§

fn random_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

Generate a random value in the given range. Read more
§

fn random_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
§

fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being true. Read more
§

fn sample<T, D>(&mut self, distr: D) -> T
where D: Distribution<T>,

Sample a new value, using the given distribution. Read more
§

fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>
where D: Distribution<T>, Self: Sized,

Create an iterator that generates values using the given distribution. Read more
§

fn fill<T>(&mut self, dest: &mut [T])
where T: Fill,

Fill any type implementing [Fill] with random data Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a [MaybeRef].
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

§

impl<T, S> SpanWrap<S> for T
where S: WrappingSpan<T>,

§

fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned

Invokes [WrappingSpan::make_wrapped] to wrap an AST node in a span.
Source§

impl<T> ToHex for T
where T: AsRef<[u8]>,

Source§

fn encode_hex<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca)
Source§

fn encode_hex_upper<U>(&self) -> U
where U: FromIterator<char>,

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA)
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<R> TryCryptoRng for R
where R: DerefMut, <R as Deref>::Target: TryCryptoRng,

Source§

impl<R> TryCryptoRng for R
where R: CryptoRng + ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( self: Pin<&mut F>, cx: &mut Context<'_>, ) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where Self::Ok: Sink<Item, Error = Self::Error>, Self: Sized,

Flattens the execution of this future when the successful result of this future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where F: FnOnce(Self::Ok) -> T, Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where F: FnOnce(Self::Ok) -> T, E: FnOnce(Self::Error) -> T, Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where F: FnOnce(Self::Error) -> E, Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where Self: Sized, Self::Error: Into<E>,

Maps this future’s Error to a new error type using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where Self: Sized, Self::Ok: Into<U>,

Maps this future’s Ok to a new type using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where F: FnOnce(Self::Ok) -> Fut, Fut: TryFuture<Error = Self::Error>, Self: Sized,

Executes another future after this one resolves successfully. The success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where F: FnOnce(Self::Error) -> Fut, Fut: TryFuture<Ok = Self::Ok>, Self: Sized,

Executes another future if this one resolves to an error. The error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where F: FnOnce(&Self::Ok), Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where F: FnOnce(&Self::Error), Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where Self::Ok: TryFuture<Error = Self::Error>, Self: Sized,

Flatten the execution of this future when the successful result of this future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where Self::Ok: TryStream<Error = Self::Error>, Self: Sized,

Flatten the execution of this future when the successful result of this future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where Self: Sized, F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s Ok type as its Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where Self: Sized,

Wraps a [TryFuture] into a type that implements Future. Read more
§

fn try_poll_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::Ok, Self::Error>>
where Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin future types.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<R> TryRng for R
where R: DerefMut, <R as Deref>::Target: TryRng,

§

type Error = <<R as Deref>::Target as TryRng>::Error

The type returned in the event of a RNG error. Read more
§

fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>

Return the next random u32.
§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>

Return the next random u64.
§

fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>

Fill dst entirely with random data.
§

impl<R> TryRngCore for R
where R: TryRng,

§

type Error = <R as TryRng>::Error

👎Deprecated since 0.10.0:

use TryRng instead

Error type.
Source§

impl<R> TryRngCore for R
where R: RngCore + ?Sized,

Source§

type Error = Infallible

The type returned in the event of a RNG error.
Source§

fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>

Return the next random u64.
Source§

fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>

Fill dest entirely with random data.
Source§

fn unwrap_err(self) -> UnwrapErr<Self>
where Self: Sized,

Wrap RNG with the UnwrapErr wrapper.
Source§

fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>

Wrap RNG with the UnwrapMut wrapper.
Source§

fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>
where Self: Sized,

Convert an RngCore to a RngReadAdapter.
§

impl<T> TypedCommands for T
where T: ConnectionLike,

§

fn get<'a, K>(&'a mut self, key: K) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the value of a key. If key is a vec this becomes an MGET (if using TypedCommands, you should specifically use mget to get the correct return type. Redis Docs
§

fn mget<'a, K>(&'a mut self, key: K) -> Result<Vec<Option<String>>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Get values of keys Redis Docs
§

fn keys<'a, K>(&'a mut self, key: K) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Gets all keys matching pattern Redis Docs
§

fn set<'a, K, V>(&'a mut self, key: K, value: V) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Set the string value of a key. Redis Docs
§

fn set_options<'a, K, V>( &'a mut self, key: K, value: V, options: SetOptions, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Set the string value of a key with options. Redis Docs
§

fn mset<'a, K, V>(&'a mut self, items: &'a [(K, V)]) -> Result<(), RedisError>
where K: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Sets multiple keys to their values. Redis Docs
§

fn set_ex<'a, K, V>( &'a mut self, key: K, value: V, seconds: u64, ) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Set the value and expiration of a key. Redis Docs
§

fn pset_ex<'a, K, V>( &'a mut self, key: K, value: V, milliseconds: u64, ) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Set the value and expiration in milliseconds of a key. Redis Docs
§

fn set_nx<'a, K, V>(&'a mut self, key: K, value: V) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Set the value of a key, only if the key does not exist Redis Docs
§

fn mset_nx<'a, K, V>( &'a mut self, items: &'a [(K, V)], ) -> Result<bool, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Sets multiple keys to their values failing if at least one already exists. Redis Docs
§

fn mset_ex<'a, K, V>( &'a mut self, items: &'a [(K, V)], options: MSetOptions, ) -> Result<bool, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Sets the given keys to their respective values. This command is an extension of the MSETNX that adds expiration and XX options. Redis Docs
§

fn getset<'a, K, V>( &'a mut self, key: K, value: V, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Set the string value of a key and return its old value. Redis Docs
§

fn getrange<'a, K>( &'a mut self, key: K, from: isize, to: isize, ) -> Result<String, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value. Redis returns an empty string if the key doesn’t exist, not Nil Redis Docs
§

fn setrange<'a, K, V>( &'a mut self, key: K, offset: isize, value: V, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Overwrite the part of the value stored in key at the specified offset. Redis Docs
§

fn del<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Delete one or more keys. Returns the number of keys deleted. Redis Docs
§

fn del_ex<'a, K>( &'a mut self, key: K, value_comparison: ValueComparison, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Conditionally removes the specified key. A key is ignored if it does not exist. IFEQ match-value - Delete the key only if its value is equal to match-value IFNE match-value - Delete the key only if its value is not equal to match-value IFDEQ match-digest - Delete the key only if the digest of its value is equal to match-digest IFDNE match-digest - Delete the key only if the digest of its value is not equal to match-digest Redis Docs
§

fn digest<'a, K>(&'a mut self, key: K) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the hex signature of the value stored in the specified key. For the digest, Redis will use XXH3 Redis Docs
§

fn exists<'a, K>(&'a mut self, key: K) -> Result<bool, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Determine if a key exists. Redis Docs
§

fn key_type<'a, K>(&'a mut self, key: K) -> Result<ValueType, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Determine the type of key. Redis Docs
§

fn expire<'a, K>(&'a mut self, key: K, seconds: i64) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Set a key’s time to live in seconds. Returns whether expiration was set. Redis Docs
§

fn expire_at<'a, K>(&'a mut self, key: K, ts: i64) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Set the expiration for a key as a UNIX timestamp. Returns whether expiration was set. Redis Docs
§

fn pexpire<'a, K>(&'a mut self, key: K, ms: i64) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Set a key’s time to live in milliseconds. Returns whether expiration was set. Redis Docs
§

fn pexpire_at<'a, K>(&'a mut self, key: K, ts: i64) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Set the expiration for a key as a UNIX timestamp in milliseconds. Returns whether expiration was set. Redis Docs
§

fn expire_time<'a, K>( &'a mut self, key: K, ) -> Result<IntegerReplyOrNoOp, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the absolute Unix expiration timestamp in seconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn pexpire_time<'a, K>( &'a mut self, key: K, ) -> Result<IntegerReplyOrNoOp, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the absolute Unix expiration timestamp in milliseconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn persist<'a, K>(&'a mut self, key: K) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Remove the expiration from a key. Returns whether a timeout was removed. Redis Docs
§

fn ttl<'a, K>(&'a mut self, key: K) -> Result<IntegerReplyOrNoOp, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the time to live for a key in seconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn pttl<'a, K>(&'a mut self, key: K) -> Result<IntegerReplyOrNoOp, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the time to live for a key in milliseconds. Returns ExistsButNotRelevant if key exists but has no expiration time. Redis Docs
§

fn get_ex<'a, K>( &'a mut self, key: K, expire_at: Expiry, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the value of a key and set expiration Redis Docs
§

fn get_del<'a, K>(&'a mut self, key: K) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the value of a key and delete it Redis Docs
§

fn copy<'a, KSrc, KDst, Db>( &'a mut self, source: KSrc, destination: KDst, options: CopyOptions<Db>, ) -> Result<bool, RedisError>
where KSrc: ToSingleRedisArg + Send + Sync + 'a, KDst: ToSingleRedisArg + Send + Sync + 'a, Db: ToString + Send + Sync + 'a,

Copy the value from one key to another, returning whether the copy was successful. Redis Docs
§

fn rename<'a, K, N>(&'a mut self, key: K, new_key: N) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, N: ToSingleRedisArg + Send + Sync + 'a,

Rename a key. Errors if key does not exist. Redis Docs
§

fn rename_nx<'a, K, N>( &'a mut self, key: K, new_key: N, ) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, N: ToSingleRedisArg + Send + Sync + 'a,

Rename a key, only if the new key does not exist. Errors if key does not exist. Returns whether the key was renamed, or false if the new key already exists. Redis Docs
Unlink one or more keys. This is a non-blocking version of DEL. Returns number of keys unlinked. Redis Docs
§

fn append<'a, K, V>(&'a mut self, key: K, value: V) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Append a value to a key. Returns length of string after operation. Redis Docs
§

fn incr<'a, K, V>(&'a mut self, key: K, delta: V) -> Result<isize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Increment the numeric value of a key by the given amount. This issues a INCRBY or INCRBYFLOAT depending on the type. If the key does not exist, it is set to 0 before performing the operation.
§

fn decr<'a, K, V>(&'a mut self, key: K, delta: V) -> Result<isize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Decrement the numeric value of a key by the given amount. If the key does not exist, it is set to 0 before performing the operation. Redis Docs
§

fn increx<'a, K, V>( &'a mut self, key: K, increment: V, options: IncrexOptions<V>, ) -> Result<IncrexResult, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Increment the numeric value of a key by the given amount and set its expiration. Read more
§

fn setbit<'a, K>( &'a mut self, key: K, offset: usize, value: bool, ) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Sets or clears the bit at offset in the string value stored at key. Returns the original bit value stored at offset. Redis Docs
§

fn getbit<'a, K>( &'a mut self, key: K, offset: usize, ) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns the bit value at offset in the string value stored at key. Redis Docs
§

fn bitcount<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Count set bits in a string. Returns 0 if key does not exist. Redis Docs
§

fn bitcount_range<'a, K>( &'a mut self, key: K, start: usize, end: usize, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Count set bits in a string in a range. Returns 0 if key does not exist. Redis Docs
§

fn bit_and<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

Perform a bitwise AND between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_or<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

Perform a bitwise OR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_xor<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

Perform a bitwise XOR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_not<'a, D, S>( &'a mut self, dstkey: D, srckey: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToSingleRedisArg + Send + Sync + 'a,

Perform a bitwise NOT of the key (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
§

fn bit_diff<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

DIFF(X, Y1, Y2, …)
Perform a set difference to extract the members of X that are not members of any of Y1, Y2,….
Logical representation: X ∧ ¬(Y1 ∨ Y2 ∨ …)
Redis Docs
§

fn bit_diff1<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

DIFF1(X, Y1, Y2, …) (Relative complement difference)
Perform a relative complement set difference to extract the members of one or more of Y1, Y2,… that are not members of X.
Logical representation: ¬X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
§

fn bit_and_or<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

ANDOR(X, Y1, Y2, …)
Perform an “intersection of union(s)” operation to extract the members of X that are also members of one or more of Y1, Y2,….
Logical representation: X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
§

fn bit_one<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

ONE(X, Y1, Y2, …)
Perform an “exclusive membership” operation to extract the members of exactly one of X, Y1, Y2, ….
Logical representation: (X ∨ Y1 ∨ Y2 ∨ …) ∧ ¬((X ∧ Y1) ∨ (X ∧ Y2) ∨ (Y1 ∧ Y2) ∨ (Y1 ∧ Y3) ∨ …)
Redis Docs
§

fn strlen<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the length of the value stored in a key. 0 if key does not exist. Redis Docs
§

fn hget<'a, K, F>( &'a mut self, key: K, field: F, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a,

Gets a single (or multiple) fields from a hash.
§

fn hmget<'a, K, F>( &'a mut self, key: K, fields: F, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Gets multiple fields from a hash. Redis Docs
§

fn hget_ex<'a, K, F>( &'a mut self, key: K, fields: F, expire_at: Expiry, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Get the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
§

fn hdel<'a, K, F>(&'a mut self, key: K, field: F) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Deletes a single (or multiple) fields from a hash. Returns number of fields deleted. Redis Docs
§

fn hget_del<'a, K, F>( &'a mut self, key: K, fields: F, ) -> Result<Vec<Option<String>>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Get and delete the value of one or more fields of a given hash key Redis Docs
§

fn hset<'a, K, F, V>( &'a mut self, key: K, field: F, value: V, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Sets a single field in a hash. Returns number of fields added. Redis Docs
§

fn hset_ex<'a, K, F, V>( &'a mut self, key: K, hash_field_expiration_options: &'a HashFieldExpirationOptions, fields_values: &'a [(F, V)], ) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Set the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
§

fn hset_nx<'a, K, F, V>( &'a mut self, key: K, field: F, value: V, ) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Sets a single field in a hash if it does not exist. Returns whether the field was added. Redis Docs
§

fn hset_multiple<'a, K, F, V>( &'a mut self, key: K, items: &'a [(F, V)], ) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Sets multiple fields in a hash. Redis Docs
§

fn hincr<'a, K, F, D>( &'a mut self, key: K, field: F, delta: D, ) -> Result<f64, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a,

Increments a value. Returns the new value of the field after incrementation.
§

fn hexists<'a, K, F>(&'a mut self, key: K, field: F) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a,

Checks if a field in a hash exists. Redis Docs
§

fn httl<'a, K, F>( &'a mut self, key: K, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Get one or more fields’ TTL in seconds. Redis Docs
§

fn hpttl<'a, K, F>( &'a mut self, key: K, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Get one or more fields’ TTL in milliseconds. Redis Docs
§

fn hexpire<'a, K, F>( &'a mut self, key: K, seconds: i64, opt: ExpireOption, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Set one or more fields’ time to live in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
§

fn hexpire_at<'a, K, F>( &'a mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Set the expiration for one or more fields as a UNIX timestamp in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
§

fn hexpire_time<'a, K, F>( &'a mut self, key: K, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
§

fn hpersist<'a, K, F>( &'a mut self, key: K, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Remove the expiration from a key. Returns 1 if the expiration was removed. Redis Docs
§

fn hpexpire<'a, K, F>( &'a mut self, key: K, milliseconds: i64, opt: ExpireOption, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Set one or more fields’ time to live in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
§

fn hpexpire_at<'a, K, F>( &'a mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Set the expiration for one or more fields as a UNIX timestamp in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
§

fn hpexpire_time<'a, K, F>( &'a mut self, key: K, fields: F, ) -> Result<Vec<IntegerReplyOrNoOp>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a,

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
§

fn hkeys<'a, K>(&'a mut self, key: K) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Gets all the keys in a hash. Redis Docs
§

fn hvals<'a, K>(&'a mut self, key: K) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Gets all the values in a hash. Redis Docs
§

fn hgetall<'a, K>( &'a mut self, key: K, ) -> Result<HashMap<String, String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Gets all the fields and values in a hash. Redis Docs
§

fn hlen<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Gets the length of a hash. Returns 0 if key does not exist. Redis Docs
§

fn blmove<'a, S, D>( &'a mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, timeout: f64, ) -> Result<Option<String>, RedisError>
where S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a,

Pop an element from a list, push it to another list and return it; or block until one is available Redis Docs
§

fn blmpop<'a, K>( &'a mut self, timeout: f64, numkeys: usize, key: K, dir: Direction, count: usize, ) -> Result<Option<[String; 2]>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Pops count elements from the first non-empty list key from the list of provided key names; or blocks until one is available. Redis Docs
§

fn blpop<'a, K>( &'a mut self, key: K, timeout: f64, ) -> Result<Option<[String; 2]>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Remove and get the first element in a list, or block until one is available. Redis Docs
§

fn brpop<'a, K>( &'a mut self, key: K, timeout: f64, ) -> Result<Option<[String; 2]>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Remove and get the last element in a list, or block until one is available. Redis Docs
§

fn brpoplpush<'a, S, D>( &'a mut self, srckey: S, dstkey: D, timeout: f64, ) -> Result<Option<String>, RedisError>
where S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a,

Pop a value from a list, push it to another list and return it; or block until one is available. Redis Docs
§

fn lindex<'a, K>( &'a mut self, key: K, index: isize, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get an element from a list by its index. Redis Docs
§

fn linsert_before<'a, K, P, V>( &'a mut self, key: K, pivot: P, value: V, ) -> Result<isize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, P: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Insert an element before another element in a list. Redis Docs
§

fn linsert_after<'a, K, P, V>( &'a mut self, key: K, pivot: P, value: V, ) -> Result<isize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, P: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Insert an element after another element in a list. Redis Docs
§

fn llen<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns the length of the list stored at key. Redis Docs
§

fn lmove<'a, S, D>( &'a mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, ) -> Result<String, RedisError>
where S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a,

Pop an element a list, push it to another list and return it Redis Docs
§

fn lmpop<'a, K>( &'a mut self, numkeys: usize, key: K, dir: Direction, count: usize, ) -> Result<Option<(String, Vec<String>)>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Pops count elements from the first non-empty list key from the list of provided key names. Redis Docs
§

fn lpop<'a, RV, K>( &'a mut self, key: K, count: Option<NonZero<usize>>, ) -> Result<RV, RedisError>
where RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a,

Removes and returns the up to count first elements of the list stored at key. Read more
§

fn lpos<'a, RV, K, V>( &'a mut self, key: K, value: V, options: LposOptions, ) -> Result<RV, RedisError>
where RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Returns the index of the first matching value of the list stored at key. Redis Docs
§

fn lpush<'a, K, V>(&'a mut self, key: K, value: V) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Insert all the specified values at the head of the list stored at key. Redis Docs
§

fn lpush_exists<'a, K, V>( &'a mut self, key: K, value: V, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Inserts a value at the head of the list stored at key, only if key already exists and holds a list. Redis Docs
§

fn lrange<'a, K>( &'a mut self, key: K, start: isize, stop: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns the specified elements of the list stored at key. Redis Docs
§

fn lrem<'a, K, V>( &'a mut self, key: K, count: isize, value: V, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Removes the first count occurrences of elements equal to value from the list stored at key. Redis Docs
§

fn ltrim<'a, K>( &'a mut self, key: K, start: isize, stop: isize, ) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Trim an existing list so that it will contain only the specified range of elements specified. Redis Docs
§

fn lset<'a, K, V>( &'a mut self, key: K, index: isize, value: V, ) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a,

Sets the list element at index to value Redis Docs
§

fn ping<'a>(&'a mut self) -> Result<String, RedisError>

Sends a ping to the server Redis Docs
§

fn ping_message<'a, K>(&'a mut self, message: K) -> Result<String, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Sends a ping with a message to the server Redis Docs
§

fn rpop<'a, RV, K>( &'a mut self, key: K, count: Option<NonZero<usize>>, ) -> Result<RV, RedisError>
where RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a,

Removes and returns the up to count last elements of the list stored at key Read more
§

fn rpoplpush<'a, K, D>( &'a mut self, key: K, dstkey: D, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a,

Pop a value from a list, push it to another list and return it. Redis Docs
§

fn rpush<'a, K, V>(&'a mut self, key: K, value: V) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Insert all the specified values at the tail of the list stored at key. Redis Docs
§

fn rpush_exists<'a, K, V>( &'a mut self, key: K, value: V, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Inserts value at the tail of the list stored at key, only if key already exists and holds a list. Redis Docs
§

fn sadd<'a, K, M>(&'a mut self, key: K, member: M) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Add one or more members to a set. Redis Docs
§

fn scard<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the number of members in a set. Redis Docs
§

fn sdiff<'a, K>(&'a mut self, keys: K) -> Result<HashSet<String>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Subtract multiple sets. Redis Docs
§

fn sdiffstore<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Subtract multiple sets and store the resulting set in a key. Redis Docs
§

fn sinter<'a, K>(&'a mut self, keys: K) -> Result<HashSet<String>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Intersect multiple sets. Redis Docs
§

fn sinterstore<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Intersect multiple sets and store the resulting set in a key. Redis Docs
§

fn sismember<'a, K, M>( &'a mut self, key: K, member: M, ) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Determine if a given value is a member of a set. Redis Docs
§

fn smismember<'a, K, M>( &'a mut self, key: K, members: M, ) -> Result<Vec<bool>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Determine if given values are members of a set. Redis Docs
§

fn smembers<'a, K>(&'a mut self, key: K) -> Result<HashSet<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get all the members in a set. Redis Docs
§

fn smove<'a, S, D, M>( &'a mut self, srckey: S, dstkey: D, member: M, ) -> Result<bool, RedisError>
where S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Move a member from one set to another. Redis Docs
§

fn spop<'a, RV, K>(&'a mut self, key: K) -> Result<RV, RedisError>
where RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a,

Remove and return a random member from a set. Redis Docs
§

fn srandmember<'a, K>( &'a mut self, key: K, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get one random member from a set. Redis Docs
§

fn srandmember_multiple<'a, K>( &'a mut self, key: K, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get multiple random members from a set. Redis Docs
§

fn srem<'a, K, M>(&'a mut self, key: K, member: M) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Remove one or more members from a set. Redis Docs
§

fn sunion<'a, K>(&'a mut self, keys: K) -> Result<HashSet<String>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Add multiple sets. Redis Docs
§

fn sunionstore<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Add multiple sets and store the resulting set in a key. Redis Docs
§

fn zadd<'a, K, S, M>( &'a mut self, key: K, member: M, score: S, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, S: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Add one member to a sorted set, or update its score if it already exists. Redis Docs
§

fn zadd_multiple<'a, K, S, M>( &'a mut self, key: K, items: &'a [(S, M)], ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
§

fn zadd_options<'a, K, S, M>( &'a mut self, key: K, member: M, score: S, options: &'a SortedSetAddOptions, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, S: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Add one member to a sorted set, or update its score if it already exists. Redis Docs
§

fn zadd_multiple_options<'a, K, S, M>( &'a mut self, key: K, items: &'a [(S, M)], options: &'a SortedSetAddOptions, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
§

fn zcard<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Get the number of members in a sorted set. Redis Docs
§

fn zcount<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Count the members in a sorted set with scores within the given values. Redis Docs
§

fn zincr<'a, K, M, D>( &'a mut self, key: K, member: M, delta: D, ) -> Result<f64, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a,

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. Redis Docs
§

fn zinterstore<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Intersect multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
§

fn zinterstore_min<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Intersect multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
§

fn zinterstore_max<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Intersect multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
§

fn zinterstore_weights<'a, D, K, W>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a,

[Commands::zinterstore], but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
§

fn zinterstore_min_weights<'a, D, K, W>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a,

[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. Redis Docs
§

fn zinterstore_max_weights<'a, D, K, W>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a,

[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. Redis Docs
§

fn zlexcount<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Count the number of members in a sorted set between a given lexicographical range. Redis Docs
§

fn bzpopmax<'a, K>( &'a mut self, key: K, timeout: f64, ) -> Result<Option<(String, String, f64)>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Removes and returns the member with the highest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
§

fn zpopmax<'a, K>( &'a mut self, key: K, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Removes and returns up to count members with the highest scores in a sorted set Redis Docs
§

fn bzpopmin<'a, K>( &'a mut self, key: K, timeout: f64, ) -> Result<Option<(String, String, f64)>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Removes and returns the member with the lowest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
§

fn zpopmin<'a, K>( &'a mut self, key: K, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Removes and returns up to count members with the lowest scores in a sorted set Redis Docs
§

fn bzmpop_max<'a, K>( &'a mut self, timeout: f64, keys: K, count: isize, ) -> Result<Option<(String, Vec<(String, f64)>)>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

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. Blocks until a member is available otherwise. Redis Docs
§

fn zmpop_max<'a, K>( &'a mut self, keys: K, count: isize, ) -> Result<Option<(String, Vec<(String, f64)>)>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

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. Redis Docs
§

fn bzmpop_min<'a, K>( &'a mut self, timeout: f64, keys: K, count: isize, ) -> Result<Option<(String, Vec<(String, f64)>)>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

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. Blocks until a member is available otherwise. Redis Docs
§

fn zmpop_min<'a, K>( &'a mut self, keys: K, count: isize, ) -> Result<Option<(String, Vec<(String, f64)>)>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

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. Redis Docs
§

fn zrandmember<'a, RV, K>( &'a mut self, key: K, count: Option<isize>, ) -> Result<RV, RedisError>
where RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a,

Return up to count random members in a sorted set (or 1 if count == None) Redis Docs
§

fn zrandmember_withscores<'a, RV, K>( &'a mut self, key: K, count: isize, ) -> Result<RV, RedisError>
where RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a,

Return up to count random members in a sorted set with scores Redis Docs
§

fn zrange<'a, K>( &'a mut self, key: K, start: isize, stop: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by index Redis Docs
§

fn zrange_withscores<'a, K>( &'a mut self, key: K, start: isize, stop: isize, ) -> Result<Vec<(String, f64)>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by index with scores. Redis Docs
§

fn zrangebylex<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by lexicographical range. Redis Docs
§

fn zrangebylex_limit<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
§

fn zrevrangebylex<'a, K, MM, M>( &'a mut self, key: K, max: MM, min: M, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by lexicographical range. Redis Docs
§

fn zrevrangebylex_limit<'a, K, MM, M>( &'a mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
§

fn zrangebyscore<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score. Redis Docs
§

fn zrangebyscore_withscores<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, ) -> Result<Vec<(String, usize)>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score with scores. Redis Docs
§

fn zrangebyscore_limit<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score with limit. Redis Docs
§

fn zrangebyscore_limit_withscores<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<Vec<(String, usize)>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
§

fn zrank<'a, K, M>( &'a mut self, key: K, member: M, ) -> Result<Option<usize>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Determine the index of a member in a sorted set. Redis Docs
§

fn zrem<'a, K, M>(&'a mut self, key: K, members: M) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Remove one or more members from a sorted set. Redis Docs
§

fn zrembylex<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Remove all members in a sorted set between the given lexicographical range. Redis Docs
§

fn zremrangebyrank<'a, K>( &'a mut self, key: K, start: isize, stop: isize, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Remove all members in a sorted set within the given indexes. Redis Docs
§

fn zrembyscore<'a, K, M, MM>( &'a mut self, key: K, min: M, max: MM, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a,

Remove all members in a sorted set within the given scores. Redis Docs
§

fn zrevrange<'a, K>( &'a mut self, key: K, start: isize, stop: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by index, ordered from high to low. Redis Docs
§

fn zrevrange_withscores<'a, K>( &'a mut self, key: K, start: isize, stop: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by index, with scores ordered from high to low. Redis Docs
§

fn zrevrangebyscore<'a, K, MM, M>( &'a mut self, key: K, max: MM, min: M, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score. Redis Docs
§

fn zrevrangebyscore_withscores<'a, K, MM, M>( &'a mut self, key: K, max: MM, min: M, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score with scores. Redis Docs
§

fn zrevrangebyscore_limit<'a, K, MM, M>( &'a mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score with limit. Redis Docs
§

fn zrevrangebyscore_limit_withscores<'a, K, MM, M>( &'a mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
§

fn zrevrank<'a, K, M>( &'a mut self, key: K, member: M, ) -> Result<Option<usize>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Determine the index of a member in a sorted set, with scores ordered from high to low. Redis Docs
§

fn zscore<'a, K, M>( &'a mut self, key: K, member: M, ) -> Result<Option<f64>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Get the score associated with the given member in a sorted set. Redis Docs
§

fn zscore_multiple<'a, K, M>( &'a mut self, key: K, members: &'a [M], ) -> Result<Option<Vec<f64>>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Get the scores associated with multiple members in a sorted set. Redis Docs
§

fn zunionstore<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Unions multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
§

fn zunionstore_min<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Unions multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
§

fn zunionstore_max<'a, D, K>( &'a mut self, dstkey: D, keys: K, ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a,

Unions multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
§

fn zunionstore_weights<'a, D, K, W>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a,

[Commands::zunionstore], but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
§

fn zunionstore_min_weights<'a, D, K, W>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a,

[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. Redis Docs
§

fn zunionstore_max_weights<'a, D, K, W>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> Result<usize, RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a,

[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. Redis Docs
§

fn pfadd<'a, K, E>(&'a mut self, key: K, element: E) -> Result<bool, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a,

Adds the specified elements to the specified HyperLogLog. Redis Docs
§

fn pfcount<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s). Redis Docs
§

fn pfmerge<'a, D, S>( &'a mut self, dstkey: D, srckeys: S, ) -> Result<(), RedisError>
where D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

Merge N different HyperLogLogs into a single one. Redis Docs
§

fn publish<'a, K, E>( &'a mut self, channel: K, message: E, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, E: ToSingleRedisArg + Send + Sync + 'a,

Posts a message to the given channel. Redis Docs
§

fn spublish<'a, K, E>( &'a mut self, channel: K, message: E, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, E: ToSingleRedisArg + Send + Sync + 'a,

Posts a message to the given sharded channel. Redis Docs
§

fn object_encoding<'a, K>( &'a mut self, key: K, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns the encoding of a key. Redis Docs
§

fn object_idletime<'a, K>( &'a mut self, key: K, ) -> Result<Option<usize>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns the time in seconds since the last access of a key. Redis Docs
§

fn object_freq<'a, K>(&'a mut self, key: K) -> Result<Option<usize>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns the logarithmic access frequency counter of a key. Redis Docs
§

fn object_refcount<'a, K>( &'a mut self, key: K, ) -> Result<Option<usize>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns the reference count of a key. Redis Docs
§

fn client_getname<'a>(&'a mut self) -> Result<Option<String>, RedisError>

Returns the name of the current connection as set by CLIENT SETNAME. Redis Docs
§

fn client_id<'a>(&'a mut self) -> Result<isize, RedisError>

Returns the ID of the current connection. Redis Docs
§

fn client_setname<'a, K>( &'a mut self, connection_name: K, ) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Command assigns a name to the current connection. Redis Docs
§

fn acl_load<'a>(&'a mut self) -> Result<(), RedisError>

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. Redis Docs
§

fn acl_save<'a>(&'a mut self) -> Result<(), RedisError>

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. Redis Docs
§

fn acl_list<'a>(&'a mut self) -> Result<Vec<String>, RedisError>

Shows the currently active ACL rules in the Redis server. Redis Docs
§

fn acl_users<'a>(&'a mut self) -> Result<Vec<String>, RedisError>

Shows a list of all the usernames of the currently configured users in the Redis ACL system. Redis Docs
§

fn acl_getuser<'a, K>( &'a mut self, username: K, ) -> Result<Option<AclInfo>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Returns all the rules defined for an existing ACL user. Redis Docs
§

fn acl_setuser<'a, K>(&'a mut self, username: K) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Creates an ACL user without any privilege. Redis Docs
§

fn acl_setuser_rules<'a, K>( &'a mut self, username: K, rules: &'a [Rule], ) -> Result<(), RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Creates an ACL user with the specified rules or modify the rules of an existing user. Redis Docs
§

fn acl_deluser<'a, K>( &'a mut self, usernames: &'a [K], ) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Redis Docs
§

fn acl_dryrun<'a, K, C, A>( &'a mut self, username: K, command: C, args: A, ) -> Result<String, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, C: ToSingleRedisArg + Send + Sync + 'a, A: ToRedisArgs + Send + Sync + 'a,

Simulate the execution of a given command by a given user. Redis Docs
§

fn acl_cat<'a>(&'a mut self) -> Result<HashSet<String>, RedisError>

Shows the available ACL categories. Redis Docs
§

fn acl_cat_categoryname<'a, K>( &'a mut self, categoryname: K, ) -> Result<HashSet<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Shows all the Redis commands in the specified category. Redis Docs
§

fn acl_genpass<'a>(&'a mut self) -> Result<String, RedisError>

Generates a 256-bits password starting from /dev/urandom if available. Redis Docs
§

fn acl_genpass_bits<'a>(&'a mut self, bits: isize) -> Result<String, RedisError>

Generates a 1-to-1024-bits password starting from /dev/urandom if available. Redis Docs
§

fn acl_whoami<'a>(&'a mut self) -> Result<String, RedisError>

Returns the username the current connection is authenticated with. Redis Docs
§

fn acl_log<'a>(&'a mut self, count: isize) -> Result<Vec<String>, RedisError>

Shows a list of recent ACL security events Redis Docs
§

fn acl_log_reset<'a>(&'a mut self) -> Result<(), RedisError>

Clears the ACL log. Redis Docs
§

fn acl_help<'a>(&'a mut self) -> Result<Vec<String>, RedisError>

Returns a helpful text describing the different subcommands. Redis Docs
§

fn geo_add<'a, K, M>( &'a mut self, key: K, members: M, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Adds the specified geospatial items to the specified key. Read more
§

fn geo_dist<'a, K, M1, M2>( &'a mut self, key: K, member1: M1, member2: M2, unit: Unit, ) -> Result<Option<f64>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M1: ToSingleRedisArg + Send + Sync + 'a, M2: ToSingleRedisArg + Send + Sync + 'a,

Return the distance between two members in the geospatial index represented by the sorted set. Read more
§

fn geo_hash<'a, K, M>( &'a mut self, key: K, members: M, ) -> Result<Vec<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Return valid Geohash strings representing the position of one or more members of the geospatial index represented by the sorted set at key. Read more
§

fn geo_pos<'a, K, M>( &'a mut self, key: K, members: M, ) -> Result<Vec<Option<Coord<f64>>>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a,

Return the positions of all the specified members of the geospatial index represented by the sorted set at key. Read more
§

fn geo_radius<'a, K>( &'a mut self, key: K, longitude: f64, latitude: f64, radius: f64, unit: Unit, options: RadiusOptions, ) -> Result<Vec<RadiusSearchResult>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a,

Return the members of a sorted set populated with geospatial information using geo_add, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). Read more
§

fn geo_radius_by_member<'a, K, M>( &'a mut self, key: K, member: M, radius: f64, unit: Unit, options: RadiusOptions, ) -> Result<Vec<RadiusSearchResult>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a,

Retrieve members selected by distance with the center of member. The member itself is always contained in the results. Redis Docs
§

fn xack<'a, K, G, I>( &'a mut self, key: K, group: G, ids: &'a [I], ) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, I: ToRedisArgs + Send + Sync + 'a,

Ack pending stream messages checked out by a consumer. Read more
§

fn xnack<'a, K, G, ID>( &'a mut self, key: K, group: G, ids: &'a [ID], options: &'a StreamNackOptions, ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, G: ToSingleRedisArg + Send + Sync + 'a, ID: ToSingleRedisArg + Send + Sync + 'a,

Negatively acknowledge (NACK) one or more pending stream messages. Read more
§

fn xadd<'a, K, ID, F, V>( &'a mut self, key: K, id: ID, items: &'a [(F, V)], ) -> Result<Option<String>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Add a stream message by key. Use * as the id for the current timestamp. Read more
§

fn xadd_map<'a, K, ID, BTM>( &'a mut self, key: K, id: ID, map: BTM, ) -> Result<Option<String>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, BTM: ToRedisArgs + Send + Sync + 'a,

BTreeMap variant for adding a stream message by key. Use * as the id for the current timestamp. Read more
§

fn xadd_options<'a, K, ID, I>( &'a mut self, key: K, id: ID, items: I, options: &'a StreamAddOptions, ) -> Result<Option<String>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, I: ToRedisArgs + Send + Sync + 'a,

Add a stream message with options. Read more
§

fn xadd_maxlen<'a, K, ID, F, V>( &'a mut self, key: K, maxlen: StreamMaxlen, id: ID, items: &'a [(F, V)], ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a,

Add a stream message while capping the stream at a maxlength. Read more
§

fn xadd_maxlen_map<'a, K, ID, BTM>( &'a mut self, key: K, maxlen: StreamMaxlen, id: ID, map: BTM, ) -> Result<Option<String>, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, BTM: ToRedisArgs + Send + Sync + 'a,

BTreeMap variant for adding a stream message while capping the stream at a maxlength. Read more
§

fn xautoclaim_options<'a, K, G, C, MIT, S>( &'a mut self, key: K, group: G, consumer: C, min_idle_time: MIT, start: S, options: StreamAutoClaimOptions, ) -> Result<StreamAutoClaimReply, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, MIT: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

Perform a combined xpending and xclaim flow. Read more
§

fn xclaim<'a, K, G, C, MIT, ID>( &'a mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], ) -> Result<StreamClaimReply, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, MIT: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

Claim pending, unacked messages, after some period of time, currently checked out by another consumer. Read more
§

fn xclaim_options<'a, RV, K, G, C, MIT, ID>( &'a mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], options: StreamClaimOptions, ) -> Result<RV, RedisError>
where RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, MIT: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

This is the optional arguments version for claiming unacked, pending messages currently checked out by another consumer. Read more
§

fn xdel<'a, K, ID>( &'a mut self, key: K, ids: &'a [ID], ) -> Result<usize, RedisError>
where K: ToSingleRedisArg + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

Deletes a list of ids for a given stream key. Read more
§

fn xdel_ex<'a, K, ID>( &'a mut self, key: K, ids: &'a [ID], options: StreamDeletionPolicy, ) -> Result<Vec<XDelExStatusCode>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

An extension of the Streams XDEL command that provides finer control over how message entries are deleted with respect to consumer groups.
§

fn xack_del<'a, K, G, ID>( &'a mut self, key: K, group: G, ids: &'a [ID], options: StreamDeletionPolicy, ) -> Result<Vec<XAckDelStatusCode>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

A combination of XACK and XDEL that acknowledges and attempts to delete a list of ids for a given stream key and consumer group.
§

fn xgroup_create<'a, K, G, ID>( &'a mut self, key: K, group: G, id: ID, ) -> Result<(), RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

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 more
§

fn xgroup_createconsumer<'a, K, G, C>( &'a mut self, key: K, group: G, consumer: C, ) -> Result<bool, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a,

This creates a consumer explicitly (vs implicit via XREADGROUP) for given stream `key. Read more
§

fn xgroup_create_mkstream<'a, K, G, ID>( &'a mut self, key: K, group: G, id: ID, ) -> Result<(), RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

This is the alternate version for creating a consumer group which makes the stream if it doesn’t exist. Read more
§

fn xgroup_setid<'a, K, G, ID>( &'a mut self, key: K, group: G, id: ID, ) -> Result<(), RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

Alter which id you want consumers to begin reading from an existing consumer group. Read more
§

fn xgroup_destroy<'a, K, G>( &'a mut self, key: K, group: G, ) -> Result<bool, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a,

Destroy an existing consumer group for a given stream key Read more
§

fn xgroup_delconsumer<'a, K, G, C>( &'a mut self, key: K, group: G, consumer: C, ) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a,

This deletes a consumer from an existing consumer group for given stream `key. Read more
§

fn xinfo_consumers<'a, K, G>( &'a mut self, key: K, group: G, ) -> Result<StreamInfoConsumersReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a,

This returns all info details about which consumers have read messages for given consumer group. Take note of the StreamInfoConsumersReply return type. Read more
§

fn xinfo_groups<'a, K>( &'a mut self, key: K, ) -> Result<StreamInfoGroupsReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Returns all consumer groups created for a given stream key. Take note of the StreamInfoGroupsReply return type. Read more
§

fn xinfo_stream<'a, K>( &'a mut self, key: K, ) -> Result<StreamInfoStreamReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Returns info about high-level stream details (first & last message id, length, number of groups, etc.) Take note of the StreamInfoStreamReply return type. Read more
§

fn xinfo_stream_with_idempotency<'a, K>( &'a mut self, key: K, ) -> Result<StreamInfoStreamReplyWithIdempotency, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Returns stream info with idempotency tracking statistics (Redis 8.6+). Read more
§

fn xlen<'a, K>(&'a mut self, key: K) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Returns the number of messages for a given stream key. Read more
§

fn xpending<'a, K, G>( &'a mut self, key: K, group: G, ) -> Result<StreamPendingReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a,

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 more
§

fn xpending_count<'a, K, G, S, E, C>( &'a mut self, key: K, group: G, start: S, end: E, count: C, ) -> Result<StreamPendingCountReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a,

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
§

fn xpending_consumer_count<'a, K, G, S, E, C, CN>( &'a mut self, key: K, group: G, start: S, end: E, count: C, consumer: CN, ) -> Result<StreamPendingCountReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, CN: ToRedisArgs + Send + Sync + 'a,

An alternate version of xpending_count which filters by consumer name. Read more
§

fn xrange<'a, K, S, E>( &'a mut self, key: K, start: S, end: E, ) -> Result<StreamRangeReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a,

Returns a range of messages in a given stream key. Read more
§

fn xrange_all<'a, K>( &'a mut self, key: K, ) -> Result<StreamRangeReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

A helper method for automatically returning all messages in a stream by key. Use with caution! Read more
§

fn xrange_count<'a, K, S, E, C>( &'a mut self, key: K, start: S, end: E, count: C, ) -> Result<StreamRangeReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a,

A method for paginating a stream by key. Read more
§

fn xread<'a, K, ID>( &'a mut self, keys: &'a [K], ids: &'a [ID], ) -> Result<Option<StreamReadReply>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

Read a list of ids 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 more
§

fn xread_options<'a, K, ID>( &'a mut self, keys: &'a [K], ids: &'a [ID], options: &'a StreamReadOptions, ) -> Result<Option<StreamReadReply>, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a,

This method handles setting optional arguments for XREAD or XREADGROUP Redis commands. Read more
§

fn xrevrange<'a, K, E, S>( &'a mut self, key: K, end: E, start: S, ) -> Result<StreamRangeReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a,

This is the reverse version of xrange. The same rules apply for start and end here. Read more
§

fn xrevrange_all<'a, K>( &'a mut self, key: K, ) -> Result<StreamRangeReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

This is the reverse version of xrange_all. The same rules apply for start and end here. Read more
§

fn xrevrange_count<'a, K, E, S, C>( &'a mut self, key: K, end: E, start: S, count: C, ) -> Result<StreamRangeReply, RedisError>
where K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a,

This is the reverse version of xrange_count. The same rules apply for start and end here. Read more
§

fn xtrim<'a, K>( &'a mut self, key: K, maxlen: StreamMaxlen, ) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Trim a stream key to a MAXLEN count. Read more
§

fn xtrim_options<'a, K>( &'a mut self, key: K, options: &'a StreamTrimOptions, ) -> Result<usize, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Trim a stream key with full options Read more
§

fn xcfgset<'a, K>( &'a mut self, key: K, options: &'a StreamConfigOptions, ) -> Result<String, RedisError>
where K: ToRedisArgs + Send + Sync + 'a,

Configure idempotency parameters for a stream Read more
§

fn load_script<'a, RV>( &'a mut self, script: &'a Script, ) -> Result<RV, RedisError>
where RV: FromRedisValue,

Load a script. Read more
§

fn invoke_script<'a, RV>( &'a mut self, invocation: &'a ScriptInvocation<'a>, ) -> Result<RV, RedisError>
where RV: FromRedisValue,

Invoke a prepared script. Read more
§

fn flushall<'a>(&'a mut self) -> Result<(), RedisError>

Deletes all the keys of all databases Read more
§

fn flushall_options<'a>( &'a mut self, options: &'a FlushAllOptions, ) -> Result<(), RedisError>

Deletes all the keys of all databases with options Read more
§

fn flushdb<'a>(&'a mut self) -> Result<(), RedisError>

Deletes all the keys of the current database Read more
§

fn flushdb_options<'a>( &'a mut self, options: &'a FlushAllOptions, ) -> Result<(), RedisError>

Deletes all the keys of the current database with options Read more
§

fn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError>
where RV: FromRedisValue,

Incrementally iterate the keys space.
§

fn scan_options<RV>( &mut self, opts: ScanOptions, ) -> Result<Iter<'_, RV>, RedisError>
where RV: FromRedisValue,

Incrementally iterate the keys space with options.
§

fn scan_match<P, RV>(&mut self, pattern: P) -> Result<Iter<'_, RV>, RedisError>
where P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate the keys space for keys matching a pattern.
§

fn hscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate hash fields and associated values.
§

fn hscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate hash fields and associated values for field names matching a pattern.
§

fn sscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate set elements.
§

fn sscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate set elements for elements matching a pattern.
§

fn zscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate sorted set elements.
§

fn zscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
where K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue,

Incrementally iterate sorted set elements for elements matching a pattern.
§

fn get_int<K>(&mut self, key: K) -> Result<Option<isize>, RedisError>
where K: ToSingleRedisArg,

Get a value from Redis and convert it to an Option<isize>.
§

fn mget_ints<K>(&mut self, key: K) -> Result<Vec<Option<isize>>, RedisError>
where K: ToRedisArgs,

Get values from Redis and convert them to Option<isize>s.
§

impl<I> UnicodeNormalization<I> for I
where I: Iterator<Item = char>,

§

fn nfd(self) -> Decompositions<I>

Returns an iterator over the string in Unicode Normalization Form D (canonical decomposition).
§

fn nfkd(self) -> Decompositions<I>

Returns an iterator over the string in Unicode Normalization Form KD (compatibility decomposition).
§

fn nfc(self) -> Recompositions<I>

An Iterator over the string in Unicode Normalization Form C (canonical decomposition followed by canonical composition).
§

fn nfkc(self) -> Recompositions<I>

An Iterator over the string in Unicode Normalization Form KC (compatibility decomposition followed by canonical composition).
§

fn cjk_compat_variants(self) -> Replacements<I>

A transformation which replaces CJK Compatibility Ideograph codepoints with normal forms using Standardized Variation Sequences. This is not part of the canonical or compatibility decomposition algorithms, but performing it before those algorithms produces normalized output which better preserves the intent of the original text. Read more
§

fn stream_safe(self) -> StreamSafe<I>

An Iterator over the string with Conjoining Grapheme Joiner characters inserted according to the Stream-Safe Text Process (UAX15-D4).
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<W> WriteBytesExt for W
where W: Write + ?Sized,

§

fn write_u8(&mut self, n: u8) -> Result<(), Error>

Writes an unsigned 8 bit integer to the underlying writer. Read more
§

fn write_i8(&mut self, n: i8) -> Result<(), Error>

Writes a signed 8 bit integer to the underlying writer. Read more
§

fn write_u16<T>(&mut self, n: u16) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 16 bit integer to the underlying writer. Read more
§

fn write_i16<T>(&mut self, n: i16) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 16 bit integer to the underlying writer. Read more
§

fn write_u24<T>(&mut self, n: u32) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 24 bit integer to the underlying writer. Read more
§

fn write_i24<T>(&mut self, n: i32) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 24 bit integer to the underlying writer. Read more
§

fn write_u32<T>(&mut self, n: u32) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 32 bit integer to the underlying writer. Read more
§

fn write_i32<T>(&mut self, n: i32) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 32 bit integer to the underlying writer. Read more
§

fn write_u48<T>(&mut self, n: u64) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 48 bit integer to the underlying writer. Read more
§

fn write_i48<T>(&mut self, n: i64) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 48 bit integer to the underlying writer. Read more
§

fn write_u64<T>(&mut self, n: u64) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 64 bit integer to the underlying writer. Read more
§

fn write_i64<T>(&mut self, n: i64) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 64 bit integer to the underlying writer. Read more
§

fn write_u128<T>(&mut self, n: u128) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned 128 bit integer to the underlying writer.
§

fn write_i128<T>(&mut self, n: i128) -> Result<(), Error>
where T: ByteOrder,

Writes a signed 128 bit integer to the underlying writer.
§

fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
§

fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
§

fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes an unsigned n-bytes integer to the underlying writer. Read more
§

fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error>
where T: ByteOrder,

Writes a signed n-bytes integer to the underlying writer. Read more
§

fn write_f32<T>(&mut self, n: f32) -> Result<(), Error>
where T: ByteOrder,

Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more
§

fn write_f64<T>(&mut self, n: f64) -> Result<(), Error>
where T: ByteOrder,

Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more