[−][src]Struct redis::LposOptions
Options for the [LPOS] command
https://redis.io/commands/lpos
Example
use redis::{Commands, RedisResult, LposOptions}; fn fetch_list_position( con: &mut redis::Connection, key: &str, value: &str, count: usize, rank: isize, maxlen: usize, ) -> RedisResult<Vec<usize>> { let opts = LposOptions::default() .count(count) .rank(rank) .maxlen(maxlen); con.lpos(key, value, opts) }
Implementations
impl LposOptions
[src]
pub fn count(self, n: usize) -> Self
[src]
Limit the results to the first N matching items.
pub fn rank(self, n: isize) -> Self
[src]
Return the value of N from the matching items.
pub fn maxlen(self, n: usize) -> Self
[src]
Limit the search to N items in the list.
Trait Implementations
impl Default for LposOptions
[src]
pub fn default() -> LposOptions
[src]
impl ToRedisArgs for LposOptions
[src]
pub fn write_redis_args<W: ?Sized>(&self, out: &mut W) where
W: RedisWrite,
[src]
W: RedisWrite,
pub fn is_single_arg(&self) -> bool
[src]
pub fn to_redis_args(&self) -> Vec<Vec<u8>>
[src]
pub fn describe_numeric_behavior(&self) -> NumericBehavior
[src]
Auto Trait Implementations
impl RefUnwindSafe for LposOptions
[src]
impl Send for LposOptions
[src]
impl Sync for LposOptions
[src]
impl Unpin for LposOptions
[src]
impl UnwindSafe for LposOptions
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,