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§
§impl<'de> Deserialize<'de> for KeyKind
impl<'de> Deserialize<'de> for KeyKind
§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>,
§impl Serialize for KeyKind
impl Serialize for KeyKind
§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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.