pub trait ListCommands: CommandSend {
    fn lpush<K, E>(
        &self,
        key: K,
        elements: E
    ) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>
   where
        K: Into<BulkString> + Send,
        E: IntoArgs + Send
, { ... } fn lpop<K, E>(
        &self,
        key: K,
        count: usize
    ) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + '_>>
   where
        K: Into<BulkString> + Send,
        E: FromValue
, { ... } fn rpush<K, E>(
        &self,
        key: K,
        elements: E
    ) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>
   where
        K: Into<BulkString> + Send,
        E: IntoArgs + Send
, { ... } fn rpop<K, E>(
        &self,
        key: K,
        count: usize
    ) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + '_>>
   where
        K: Into<BulkString> + Send,
        E: FromValue
, { ... } }
Expand description

A group of Redis commands related to Lists

See Also

Redis List Commands

Provided Methods

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/

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

Return

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

See Also

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

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/lpush/

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

Return

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

See Also

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

Implementors