Struct redis_driver::ZInterUnionStore
source · [−]pub struct ZInterUnionStore<'a, T>where
T: SortedSetCommands + ?Sized,{ /* private fields */ }
Expand description
Builder for the zinterstore and zunionstore commands
Implementations
sourceimpl<'a, T> ZInterUnionStore<'a, T>where
T: SortedSetCommands + ?Sized,
impl<'a, T> ZInterUnionStore<'a, T>where
T: SortedSetCommands + ?Sized,
sourcepub fn weights<W>(self, weights: W) -> Selfwhere
W: SingleArgOrCollection<f64>,
pub fn weights<W>(self, weights: W) -> Selfwhere
W: SingleArgOrCollection<f64>,
Using the WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set.
This means that the score of every element in every input sorted set is multiplied by this factor before being passed to the aggregation function. When WEIGHTS is not given, the multiplication factors default to 1.
sourcepub fn aggregate(self, aggregate: ZAggregate) -> Self
pub fn aggregate(self, aggregate: ZAggregate) -> Self
With the AGGREGATE option, it is possible to specify how the results of the union are aggregated.
This option defaults to SUM, where the score of an element is summed across the inputs where it exists. When this option is set to either MIN or MAX, the resulting set will contain the minimum or maximum score of an element across the inputs where it exists.
Auto Trait Implementations
impl<'a, T: ?Sized> RefUnwindSafe for ZInterUnionStore<'a, T>where
T: RefUnwindSafe,
impl<'a, T: ?Sized> Send for ZInterUnionStore<'a, T>where
T: Sync,
impl<'a, T: ?Sized> Sync for ZInterUnionStore<'a, T>where
T: Sync,
impl<'a, T: ?Sized> Unpin for ZInterUnionStore<'a, T>
impl<'a, T: ?Sized> UnwindSafe for ZInterUnionStore<'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