Trait redis_driver::ListCommands
source · [−]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
Provided Methods
sourcefn 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 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>,
sourcefn 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 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,
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
sourcefn 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 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>,
sourcefn lpos<K, E>(&self, key: K, element: E) -> LPos<'_, Self>where
K: Into<BulkString>,
E: Into<BulkString>,
fn lpos<K, E>(&self, key: K, element: E) -> LPos<'_, Self>where
K: Into<BulkString>,
E: Into<BulkString>,
Returns the index of matching elements inside a Redis list.
See Also
sourcefn 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 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>,
sourcefn 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 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>,
Trim an existing list so that it will contain only the specified range of elements specified.