pub enum Kind {
String = 0,
Hash = 1,
Set = 2,
Zset = 3,
List = 4,
Stream = 5,
Array = 6,
}Expand description
What TYPE calls a key, and what the meta byte’s tag holds.
The numbers are the same numbers yo_format::ValueType uses on disk, so that
saving a key is a copy of the tag rather than a translation of it. There is a
test at the bottom of this file holding the two in step, and it takes a dev
dependency on yo-format for no other reason.
The list is shorter than the on disk one because some of those are the same
thing in memory. A bitmap is a string and a HyperLogLog is a string, in Redis
as much as here, and TYPE on either answers string. The catalog draws
finer lines because a reader wants to know what a blob meant.
Variants§
String = 0
A string, and everything Redis stores as one.
Hash = 1
A hash.
Set = 2
A set.
Zset = 3
A sorted set.
List = 4
A list.
Stream = 5
A stream.
Array = 6
A sparse array.
Implementations§
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
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