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