pub enum RedisValue {
Nil,
Int(i64),
Float(f64),
String(String),
Bytes(Vec<u8>),
Array(Vec<RedisValue>),
Bool(bool),
}Expand description
Redis 值类型
表示 Redis 中的各种数据类型,提供类型安全的值表示
Variants§
Nil
空值
Int(i64)
整数
Float(f64)
浮点数
String(String)
字符串
Bytes(Vec<u8>)
字节数组
Array(Vec<RedisValue>)
数组
Bool(bool)
布尔值
Implementations§
Trait Implementations§
Source§impl Clone for RedisValue
impl Clone for RedisValue
Source§fn clone(&self) -> RedisValue
fn clone(&self) -> RedisValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedisValue
impl Debug for RedisValue
Source§impl From<&str> for RedisValue
impl From<&str> for RedisValue
Source§impl From<String> for RedisValue
impl From<String> for RedisValue
Source§impl From<Value> for RedisValue
impl From<Value> for RedisValue
Source§impl From<bool> for RedisValue
impl From<bool> for RedisValue
Source§impl From<f64> for RedisValue
impl From<f64> for RedisValue
Source§impl From<i32> for RedisValue
impl From<i32> for RedisValue
Source§impl From<i64> for RedisValue
impl From<i64> for RedisValue
Source§impl PartialEq for RedisValue
impl PartialEq for RedisValue
impl StructuralPartialEq for RedisValue
Auto Trait Implementations§
impl Freeze for RedisValue
impl RefUnwindSafe for RedisValue
impl Send for RedisValue
impl Sync for RedisValue
impl Unpin for RedisValue
impl UnsafeUnpin for RedisValue
impl UnwindSafe for RedisValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more