pub enum KeyKind {
Show 18 variants
Unit,
U8,
U16,
U32,
U64,
U128,
Usize,
I8,
I16,
I32,
I64,
I128,
Isize,
Signed,
Unsigned,
Bool,
String,
Bytes,
}Expand description
The type of a single field contained in a key.
Variants§
Unit
An unit type, encoded with no length.
U8
An u8 encoded in big-endian encoding.
U16
An u16 encoded in big-endian encoding.
U32
An u32 encoded in big-endian encoding.
U64
An u64 encoded in big-endian encoding.
U128
An u128 encoded in big-endian encoding.
Usize
An usize encoded in big-endian encoding.
I8
An i8 encoded in big-endian encoding.
I16
An i16 encoded in big-endian encoding.
I32
An i32 encoded in big-endian encoding.
I64
An i64 encoded in big-endian encoding.
I128
An i128 encoded in big-endian encoding.
Isize
An isize encoded in big-endian encoding.
Signed
A Signed number encoded using ordered_varint.
Unsigned
An Unsigned number encoded using ordered_varint.
Bool
A bool encoded as a single byte.
String
A String encoded using BonsaiDb’s built-in KeyEncoding.
Bytes
A byte array encoded using BonsaiDb’s built-in KeyEncoding.
Trait Implementations§
source§impl<'de> Deserialize<'de> for KeyKind
impl<'de> Deserialize<'de> for KeyKind
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<KeyKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<KeyKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for KeyKind
impl PartialEq for KeyKind
source§impl Serialize for KeyKind
impl Serialize for KeyKind
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for KeyKind
impl StructuralEq for KeyKind
impl StructuralPartialEq for KeyKind
Auto Trait Implementations§
impl RefUnwindSafe for KeyKind
impl Send for KeyKind
impl Sync for KeyKind
impl Unpin for KeyKind
impl UnwindSafe for KeyKind
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.