pub trait ListCommands: CommandSend {
Show 16 methods fn lindex<K, E>(
        &self,
        key: K,
        index: isize
    ) -> Pin<Box<dyn Future<Output = Result<E>> + '_>>
   where
        K: Into<BulkString>,
        E: FromValue
, { ... } fn linsert<K, E>(
        &self,
        key: K,
        where_: LInsertWhere,
        pivot: E,
        element: E
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
   where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn llen<K>(
        &self,
        key: K
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
   where
        K: Into<BulkString>
, { ... } fn lmove<S, D, E>(
        &self,
        source: S,
        destination: D,
        where_from: LMoveWhere,
        where_to: LMoveWhere
    ) -> Pin<Box<dyn Future<Output = Result<E>> + '_>>
   where
        S: Into<BulkString>,
        D: Into<BulkString>,
        E: FromValue
, { ... } fn lmpop<K, E, C>(
        &self,
        keys: C,
        where_: LMoveWhere,
        count: usize
    ) -> Pin<Box<dyn Future<Output = Result<(String, Vec<E>)>> + '_>>
   where
        K: Into<BulkString>,
        E: FromValue,
        C: SingleArgOrCollection<K>
, { ... } fn lpop<K, E>(
        &self,
        key: K,
        count: usize
    ) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + '_>>
   where
        K: Into<BulkString>,
        E: FromValue
, { ... } fn lpos<K, E>(&self, key: K, element: E) -> LPos<'_, Self>
   where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn lpush<K, E, C>(
        &self,
        key: K,
        elements: C
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
   where
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn lpushx<K, E, C>(
        &self,
        key: K,
        elements: C
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
   where
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn lrange<K, E>(
        &self,
        key: K,
        start: isize,
        stop: isize
    ) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + '_>>
   where
        K: Into<BulkString>,
        E: FromValue
, { ... } fn lrem<K, E>(
        &self,
        key: K,
        count: isize,
        element: E
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
   where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn lset<K, E>(
        &self,
        key: K,
        index: isize,
        element: E
    ) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>
   where
        K: Into<BulkString>,
        E: Into<BulkString>
, { ... } fn ltrim<K>(
        &self,
        key: K,
        start: isize,
        stop: isize
    ) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>
   where
        K: Into<BulkString>
, { ... } fn rpop<K, E>(
        &self,
        key: K,
        count: usize
    ) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + '_>>
   where
        K: Into<BulkString>,
        E: FromValue
, { ... } fn rpush<K, E, C>(
        &self,
        key: K,
        elements: C
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
   where
        K: Into<BulkString>,
        E: Into<BulkString>,
        C: SingleArgOrCollection<E>
, { ... } fn rpushx<K, E, C>(
        &self,
        key: K,
        elements: C
    ) -> Pin<Box<dyn Future<Output = Result<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

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.

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