Struct merino_cache::redis::domain::RedisSuggestions
source · [−]pub(crate) struct RedisSuggestions(pub(crate) Vec<Suggestion>);
Expand description
A wrapper around a Vec
of Suggestion
s that can be inserted into and retrieved
from a Redis DB.
Tuple Fields
0: Vec<Suggestion>
Trait Implementations
sourceimpl From<RedisSuggestions> for Vec<Suggestion>
impl From<RedisSuggestions> for Vec<Suggestion>
sourcefn from(val: RedisSuggestions) -> Self
fn from(val: RedisSuggestions) -> Self
Converts to this type from the input type.
sourceimpl FromRedisValue for RedisSuggestions
impl FromRedisValue for RedisSuggestions
sourcefn from_redis_value(v: &Value) -> RedisResult<Self>
fn from_redis_value(v: &Value) -> RedisResult<Self>
Given a redis Value
this attempts to convert it into the given
destination type. If that fails because it’s not compatible an
appropriate error is generated. Read more
sourcefn from_redis_values(items: &[Value]) -> Result<Vec<Self, Global>, RedisError>
fn from_redis_values(items: &[Value]) -> Result<Vec<Self, Global>, RedisError>
Similar to from_redis_value
but constructs a vector of objects
from another vector of values. This primarily exists internally
to customize the behavior for vectors of tuples. Read more
sourceimpl ToRedisArgs for RedisSuggestions
impl ToRedisArgs for RedisSuggestions
sourcefn write_redis_args<W>(&self, out: &mut W) where
W: ?Sized + RedisWrite,
fn write_redis_args<W>(&self, out: &mut W) where
W: ?Sized + RedisWrite,
This writes the value into a vector of bytes. Each item is a single argument. Most items generate a single item. Read more
sourcefn to_redis_args(&self) -> Vec<Vec<u8, Global>, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn to_redis_args(&self) -> Vec<Vec<u8, Global>, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
This converts the value into a vector of bytes. Each item is a single argument. Most items generate a vector of a single item. Read more
sourcefn describe_numeric_behavior(&self) -> NumericBehavior
fn describe_numeric_behavior(&self) -> NumericBehavior
Returns an information about the contained value with regards
to it’s numeric behavior in a redis context. This is used in
some high level concepts to switch between different implementations
of redis functions (for instance INCR
vs INCRBYFLOAT
). Read more
sourcefn is_single_arg(&self) -> bool
fn is_single_arg(&self) -> bool
Returns an indiciation if the value contained is exactly one
argument. It returns false if it’s zero or more than one. This
is used in some high level functions to intelligently switch
between GET
and MGET
variants. Read more
Auto Trait Implementations
impl RefUnwindSafe for RedisSuggestions
impl Send for RedisSuggestions
impl Sync for RedisSuggestions
impl Unpin for RedisSuggestions
impl UnwindSafe for RedisSuggestions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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
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