pub trait ListCommands<T>: PrepareCommand<T> {
Show 21 methods fn blmove<S, D, E>(
        &self,
        source: S,
        destination: D,
        where_from: LMoveWhere,
        where_to: LMoveWhere,
        timeout: f64
    ) -> CommandResult<'_, T, E>
    where
        S: Into<BulkString>,
        D: Into<BulkString>,
        E: FromValue
, { ... } fn blmpop<K, E, C>(
        &self,
        timeout: f64,
        keys: C,
        where_: LMoveWhere,
        count: usize
    ) -> CommandResult<'_, T, Option<(String, Vec<E>)>>
    where
        K: Into<BulkString>,
        E: FromValue,
        C: SingleArgOrCollection<K>
, { ... } fn blpop<K, KK, K1, V>(
        &self,
        keys: KK,
        timeout: f64
    ) -> CommandResult<'_, T, Option<(K1, V)>>
    where
        K: Into<BulkString>,
        KK: SingleArgOrCollection<K>,
        K1: FromValue,
        V: FromValue
, { ... } fn brpop<K, KK, K1, V>(
        &self,
        keys: KK,
        timeout: f64
    ) -> CommandResult<'_, T, Option<(K1, V)>>
    where
        K: Into<BulkString>,
        KK: SingleArgOrCollection<K>,
        K1: FromValue,
        V: FromValue
, { ... } fn lindex<K, E>(&self, key: K, index: isize) -> CommandResult<'_, T, E>
    where
        K: Into<BulkString>,
        E: FromValue
, { ... } fn linsert<K, E>(
        &self,
        key: K,
        where_: LInsertWhere,
        pivot: E,
        element: E
    ) -> CommandResult<'_, T, usize>
    where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn llen<K>(&self, key: K) -> CommandResult<'_, T, usize>
    where
        K: Into<BulkString>
, { ... } fn lmove<S, D, E>(
        &self,
        source: S,
        destination: D,
        where_from: LMoveWhere,
        where_to: LMoveWhere
    ) -> CommandResult<'_, T, E>
    where
        S: Into<BulkString>,
        D: Into<BulkString>,
        E: FromValue
, { ... } fn lmpop<K, E, C>(
        &self,
        keys: C,
        where_: LMoveWhere,
        count: usize
    ) -> CommandResult<'_, T, (String, Vec<E>)>
    where
        K: Into<BulkString>,
        E: FromValue,
        C: SingleArgOrCollection<K>
, { ... } fn lpop<K, E, A>(&self, key: K, count: usize) -> CommandResult<'_, T, A>
    where
        K: Into<BulkString>,
        E: FromValue,
        A: FromSingleValueArray<E>
, { ... } fn lpos<K, E>(
        &self,
        key: K,
        element: E,
        rank: Option<usize>,
        max_len: Option<usize>
    ) -> CommandResult<'_, T, Option<usize>>
    where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn lpos_with_count<K, E, A>(
        &self,
        key: K,
        element: E,
        num_matches: usize,
        rank: Option<usize>,
        max_len: Option<usize>
    ) -> CommandResult<'_, T, A>
    where
        K: Into<BulkString>,
        E: Into<BulkString>,
        A: FromSingleValueArray<usize>
, { ... } fn lpush<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>
    where
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn lpushx<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>
    where
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn lrange<K, E, A>(
        &self,
        key: K,
        start: isize,
        stop: isize
    ) -> CommandResult<'_, T, A>
    where
        K: Into<BulkString>,
        E: FromValue,
        A: FromSingleValueArray<E>
, { ... } fn lrem<K, E>(
        &self,
        key: K,
        count: isize,
        element: E
    ) -> CommandResult<'_, T, usize>
    where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn lset<K, E>(
        &self,
        key: K,
        index: isize,
        element: E
    ) -> CommandResult<'_, T, ()>
    where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn ltrim<K>(
        &self,
        key: K,
        start: isize,
        stop: isize
    ) -> CommandResult<'_, T, ()>
    where
        K: Into<BulkString>
, { ... } fn rpop<K, E, C>(&self, key: K, count: usize) -> CommandResult<'_, T, C>
    where
        K: Into<BulkString>,
        E: FromValue,
        C: FromSingleValueArray<E>
, { ... } fn rpush<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>
    where
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn rpushx<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>
    where
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... }
}
Expand description

A group of Redis commands related to Lists

See Also

Redis List Commands

Provided Methods

This command is the blocking variant of lmove.

Return

the element being popped from source and pushed to destination. If timeout is reached, a None reply is returned.

See Also

https://redis.io/commands/blmove/

This command is the blocking variant of lmpop.

Return
  • None when no element could be popped, and timeout is reached.
  • Tuple composed by the name of the key from which elements were popped and the list of popped element
See Also

https://redis.io/commands/blmpop/

This command is a blocking list pop primitive.

It is the blocking version of lpop because it blocks the connection when there are no elements to pop from any of the given lists.

An element is popped from the head of the first list that is non-empty, with the given keys being checked in the order that they are given.

Return
  • None when no element could be popped and the timeout expired
  • a tuple with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
See Also

https://redis.io/commands/blpop/

This command is a blocking list pop primitive.

It is the blocking version of rpop because it blocks the connection when there are no elements to pop from any of the given lists.

An element is popped from the tail of the first list that is non-empty, with the given keys being checked in the order that they are given.

Return
  • None when no element could be popped and the timeout expired
  • a tuple with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
See Also

https://redis.io/commands/brpop/

Returns the element at index index in the list stored at key.

Return

The requested element, or nil when index is out of range.

See Also

https://redis.io/commands/lindex/

Inserts element in the list stored at key either before or after the reference value pivot.

Return

The length of the list after the insert operation, or -1 when the value pivot was not found.

See Also

https://redis.io/commands/linsert/

Inserts element in the list stored at key either before or after the reference value pivot.

Return

The length of the list at key.

See Also

https://redis.io/commands/llen/

Atomically returns and removes the first/last element (head/tail depending on the wherefrom argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.

Return

The element being popped and pushed.

See Also

https://redis.io/commands/lmove/

Pops one or more elements from the first non-empty list key from the list of provided key names.

Return

Tuple composed by the name of the key from which elements were popped and the list of popped element

See Also

https://redis.io/commands/lmpop/

Removes and returns the first elements of the list stored at key.

Return

The list of popped elements, or empty collection when key does not exist.

See Also

https://redis.io/commands/lpop/

Returns the index of matching elements inside a Redis list.

Return

The integer representing the matching element, or nil if there is no match.

See Also

https://redis.io/commands/lpos/

Returns the index of matching elements inside a Redis list.

Return

An array of integers representing the matching elements. (empty if there are no matches).

See Also

https://redis.io/commands/lpos/

Insert all the specified values at the head of the list stored at key

Return

The length of the list after the push operations.

See Also

https://redis.io/commands/lpush/

Inserts specified values at the head of the list stored at key, only if key already exists and holds a list.

Return

The length of the list after the push operation.

See Also

https://redis.io/commands/lpushx/

Returns the specified elements of the list stored at key.

Return

The list of elements in the specified range.

See Also

https://redis.io/commands/lrange/

Removes the first count occurrences of elements equal to element from the list stored at key.

Return

The number of removed elements.

See Also

https://redis.io/commands/lrem/

Sets the list element at index to element.

See Also

https://redis.io/commands/lset/

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

See Also

https://redis.io/commands/ltrim/

Removes and returns the first elements of the list stored at key.

Return

The list of popped elements, or empty collection when key does not exist.

See Also

https://redis.io/commands/rpop/

Insert all the specified values at the tail of the list stored at key

Return

The length of the list after the push operations.

See Also

https://redis.io/commands/rpush/

Inserts specified values at the tail of the list stored at key, only if key already exists and holds a list.

Return

The length of the list after the push operations.

See Also

https://redis.io/commands/rpushx/

Implementors