pub trait ListCommands {
Show 17 methods fn lindex<K, E>(
        &mut self,
        key: K,
        index: isize
    ) -> PreparedCommand<'_, Self, E>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: FromValue
, { ... } fn linsert<K, E>(
        &mut self,
        key: K,
        where_: LInsertWhere,
        pivot: E,
        element: E
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn llen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        K: Into<BulkString>
, { ... } fn lmove<S, D, E>(
        &mut self,
        source: S,
        destination: D,
        where_from: LMoveWhere,
        where_to: LMoveWhere
    ) -> PreparedCommand<'_, Self, E>
    where
        Self: Sized,
        S: Into<BulkString>,
        D: Into<BulkString>,
        E: FromValue
, { ... } fn lmpop<K, E, C>(
        &mut self,
        keys: C,
        where_: LMoveWhere,
        count: usize
    ) -> PreparedCommand<'_, Self, (String, Vec<E>)>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: FromValue,
        C: SingleArgOrCollection<K>
, { ... } fn lpop<K, E, A>(
        &mut self,
        key: K,
        count: usize
    ) -> PreparedCommand<'_, Self, A>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: FromValue,
        A: FromSingleValueArray<E>
, { ... } fn lpos<K, E>(
        &mut self,
        key: K,
        element: E,
        rank: Option<usize>,
        max_len: Option<usize>
    ) -> PreparedCommand<'_, Self, Option<usize>>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn lpos_with_count<K, E, A>(
        &mut self,
        key: K,
        element: E,
        num_matches: usize,
        rank: Option<usize>,
        max_len: Option<usize>
    ) -> PreparedCommand<'_, Self, A>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>,
        A: FromSingleValueArray<usize>
, { ... } fn lpush<K, E, C>(
        &mut self,
        key: K,
        elements: C
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn lpushx<K, E, C>(
        &mut self,
        key: K,
        elements: C
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn lrange<K, E, A>(
        &mut self,
        key: K,
        start: isize,
        stop: isize
    ) -> PreparedCommand<'_, Self, A>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: FromValue,
        A: FromSingleValueArray<E>
, { ... } fn lrem<K, E>(
        &mut self,
        key: K,
        count: isize,
        element: E
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn lset<K, E>(
        &mut self,
        key: K,
        index: isize,
        element: E
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn ltrim<K>(
        &mut self,
        key: K,
        start: isize,
        stop: isize
    ) -> PreparedCommand<'_, Self, ()>
    where
        Self: Sized,
        K: Into<BulkString>
, { ... } fn rpop<K, E, C>(
        &mut self,
        key: K,
        count: usize
    ) -> PreparedCommand<'_, Self, C>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: FromValue,
        C: FromSingleValueArray<E>
, { ... } fn rpush<K, E, C>(
        &mut self,
        key: K,
        elements: C
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn rpushx<K, E, C>(
        &mut self,
        key: K,
        elements: C
    ) -> PreparedCommand<'_, Self, usize>
    where
        Self: Sized,
        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

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