Struct redis_driver::HRandField
source · [−]pub struct HRandField<'a, T: HashCommands + ?Sized> { /* private fields */ }
Expand description
Builder for the hrandfield command
Implementations
sourceimpl<'a, T: HashCommands + ?Sized> HRandField<'a, T>
impl<'a, T: HashCommands + ?Sized> HRandField<'a, T>
sourcepub fn execute<F>(self) -> Pin<Box<dyn Future<Output = Result<F>> + 'a>>where
F: FromValue,
pub fn execute<F>(self) -> Pin<Box<dyn Future<Output = Result<F>> + 'a>>where
F: FromValue,
return a random field from the hash value stored at key.
See Also
sourcepub fn count<F>(
self,
count: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<F>>> + 'a>>where
F: FromValue,
pub fn count<F>(
self,
count: i64
) -> Pin<Box<dyn Future<Output = Result<Vec<F>>> + 'a>>where
F: FromValue,
If the provided count argument is positive, return an array of distinct fields. The array’s length is either count or the hash’s number of fields (HLEN), whichever is lower.
See Also
Auto Trait Implementations
impl<'a, T: ?Sized> RefUnwindSafe for HRandField<'a, T>where
T: RefUnwindSafe,
impl<'a, T: ?Sized> Send for HRandField<'a, T>where
T: Sync,
impl<'a, T: ?Sized> Sync for HRandField<'a, T>where
T: Sync,
impl<'a, T: ?Sized> Unpin for HRandField<'a, T>
impl<'a, T: ?Sized> UnwindSafe for HRandField<'a, T>where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more