Trait redis_driver::ListCommands
source · [−]pub trait ListCommands: CommandSend {
Show 17 methods
fn lindex<K, E>(&self, key: K, index: isize) -> Future<'_, E>
where
K: Into<BulkString>,
E: FromValue,
{ ... }
fn linsert<K, E>(
&self,
key: K,
where_: LInsertWhere,
pivot: E,
element: E
) -> Future<'_, usize>
where
K: Into<BulkString>,
E: Into<BulkString>,
{ ... }
fn llen<K>(&self, key: K) -> Future<'_, usize>
where
K: Into<BulkString>,
{ ... }
fn lmove<S, D, E>(
&self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere
) -> Future<'_, E>
where
S: Into<BulkString>,
D: Into<BulkString>,
E: FromValue,
{ ... }
fn lmpop<K, E, C>(
&self,
keys: C,
where_: LMoveWhere,
count: usize
) -> Future<'_, (String, Vec<E>)>
where
K: Into<BulkString>,
E: FromValue,
C: SingleArgOrCollection<K>,
{ ... }
fn lpop<K, E, A>(&self, key: K, count: usize) -> Future<'_, A>
where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
{ ... }
fn lpos<K, E>(
&self,
key: K,
element: E,
rank: Option<usize>,
max_len: Option<usize>
) -> Future<'_, Option<usize>>
where
K: Into<BulkString>,
E: Into<BulkString>,
{ ... }
fn lpos_with_count<K, E, A>(
&self,
key: K,
element: E,
num_matches: usize,
rank: Option<usize>,
max_len: Option<usize>
) -> Future<'_, A>
where
K: Into<BulkString>,
E: Into<BulkString>,
A: FromSingleValueArray<usize>,
{ ... }
fn lpush<K, E, C>(&self, key: K, elements: C) -> Future<'_, usize>
where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
{ ... }
fn lpushx<K, E, C>(&self, key: K, elements: C) -> Future<'_, usize>
where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
{ ... }
fn lrange<K, E, A>(&self, key: K, start: isize, stop: isize) -> Future<'_, A>
where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
{ ... }
fn lrem<K, E>(&self, key: K, count: isize, element: E) -> Future<'_, usize>
where
K: Into<BulkString>,
E: Into<BulkString>,
{ ... }
fn lset<K, E>(&self, key: K, index: isize, element: E) -> Future<'_, ()>
where
K: Into<BulkString>,
E: Into<BulkString>,
{ ... }
fn ltrim<K>(&self, key: K, start: isize, stop: isize) -> Future<'_, ()>
where
K: Into<BulkString>,
{ ... }
fn rpop<K, E, C>(&self, key: K, count: usize) -> Future<'_, C>
where
K: Into<BulkString>,
E: FromValue,
C: FromSingleValueArray<E>,
{ ... }
fn rpush<K, E, C>(&self, key: K, elements: C) -> Future<'_, usize>
where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
{ ... }
fn rpushx<K, E, C>(&self, key: K, elements: C) -> Future<'_, 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
) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
fn linsert<K, E>(
&self,
key: K,
where_: LInsertWhere,
pivot: E,
element: E
) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
sourcefn lmove<S, D, E>(
&self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere
) -> Future<'_, 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
) -> Future<'_, 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
) -> Future<'_, (String, Vec<E>)>where
K: Into<BulkString>,
E: FromValue,
C: SingleArgOrCollection<K>,
fn lmpop<K, E, C>(
&self,
keys: C,
where_: LMoveWhere,
count: usize
) -> Future<'_, (String, Vec<E>)>where
K: Into<BulkString>,
E: FromValue,
C: SingleArgOrCollection<K>,
sourcefn lpop<K, E, A>(&self, key: K, count: usize) -> Future<'_, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
fn lpop<K, E, A>(&self, key: K, count: usize) -> Future<'_, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
sourcefn lpos_with_count<K, E, A>(
&self,
key: K,
element: E,
num_matches: usize,
rank: Option<usize>,
max_len: Option<usize>
) -> Future<'_, A>where
K: Into<BulkString>,
E: Into<BulkString>,
A: FromSingleValueArray<usize>,
fn lpos_with_count<K, E, A>(
&self,
key: K,
element: E,
num_matches: usize,
rank: Option<usize>,
max_len: Option<usize>
) -> Future<'_, A>where
K: Into<BulkString>,
E: Into<BulkString>,
A: FromSingleValueArray<usize>,
sourcefn lpush<K, E, C>(&self, key: K, elements: C) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
fn lpush<K, E, C>(&self, key: K, elements: C) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
sourcefn lpushx<K, E, C>(&self, key: K, elements: C) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
fn lpushx<K, E, C>(&self, key: K, elements: C) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
sourcefn lrange<K, E, A>(&self, key: K, start: isize, stop: isize) -> Future<'_, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
fn lrange<K, E, A>(&self, key: K, start: isize, stop: isize) -> Future<'_, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
sourcefn lrem<K, E>(&self, key: K, count: isize, element: E) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
fn lrem<K, E>(&self, key: K, count: isize, element: E) -> Future<'_, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
sourcefn lset<K, E>(&self, key: K, index: isize, element: E) -> Future<'_, ()>where
K: Into<BulkString>,
E: Into<BulkString>,
fn lset<K, E>(&self, key: K, index: isize, element: E) -> Future<'_, ()>where
K: Into<BulkString>,
E: Into<BulkString>,
Trim an existing list so that it will contain only the specified range of elements specified.