pub enum ValkeyValue {
Show 13 variants
Nil,
Int(i64),
BulkString(Bytes),
Array(Vec<ValkeyValue>),
SimpleString(String),
Okay,
Map(Vec<(ValkeyValue, ValkeyValue)>),
Set(Vec<ValkeyValue>),
Double(f64),
Boolean(bool),
VerbatimString {
format: ValkeyVerbatimFormat,
text: String,
},
BigNumber(BigInt),
ServerError(ValkeyServerError),
}Expand description
A value returned by the Valkey server.
Covers all RESP2/RESP3 value types.
Decode into concrete Rust types via FromValkeyValue.
Mirrors redis-rs’s Value.
Variants§
Nil
A nil reply.
Int(i64)
An integer reply.
BulkString(Bytes)
Binary-safe string data.
Array(Vec<ValkeyValue>)
An array of nested values.
SimpleString(String)
A simple string, not binary-safe.
Okay
The status reply OK.
Map(Vec<(ValkeyValue, ValkeyValue)>)
An unordered key/value map (RESP3).
Set(Vec<ValkeyValue>)
An unordered set (RESP3).
Double(f64)
A double-precision float reply (RESP3).
Boolean(bool)
A boolean reply (RESP3).
VerbatimString
A verbatim string carrying a format hint (RESP3).
BigNumber(BigInt)
A number outside the range of a signed 64-bit integer (RESP3).
ServerError(ValkeyServerError)
An error reply from the server (e.g. a failed element within a reply).
Trait Implementations§
Source§impl Clone for ValkeyValue
impl Clone for ValkeyValue
Source§impl Debug for ValkeyValue
impl Debug for ValkeyValue
Source§impl FromValkeyValue for ValkeyValue
Returns the ValkeyValue unchanged.
impl FromValkeyValue for ValkeyValue
Returns the ValkeyValue unchanged.
Source§fn from_owned_valkey_value(value: ValkeyValue) -> ValkeyResult<ValkeyValue>
fn from_owned_valkey_value(value: ValkeyValue) -> ValkeyResult<ValkeyValue>
Converts an owned
ValkeyValue into Self.Source§fn from_valkey_value(value: &ValkeyValue) -> ValkeyResult<Self>
fn from_valkey_value(value: &ValkeyValue) -> ValkeyResult<Self>
Converts a borrowed
ValkeyValue into Self.Source§impl PartialEq for ValkeyValue
impl PartialEq for ValkeyValue
impl StructuralPartialEq for ValkeyValue
Auto Trait Implementations§
impl !Freeze for ValkeyValue
impl RefUnwindSafe for ValkeyValue
impl Send for ValkeyValue
impl Sync for ValkeyValue
impl Unpin for ValkeyValue
impl UnsafeUnpin for ValkeyValue
impl UnwindSafe for ValkeyValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.