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
Removes and returns the first elements of the list stored at key.
collection of popped elements, or empty collection when key does not exist.
https://redis.io/commands/lpop/
Removes and returns the first elements of the list stored at key.
collection of popped elements, or empty collection when key does not exist.
https://redis.io/commands/lpop/