pub struct BinaryKv<T>{
pub key: String,
pub value: T,
}Expand description
The data structure used to store key-value pairs in the database
Fields§
§key: StringThe key of the key-value pair
value: TThe value of the key-value pair
This is stored as a generic type so that any type can be stored
Examples
use quick_kv::{BinaryKv, Value};
BinaryKv::<Value> {
key: String::from("hello"),
value: Value::String("hello world".to_string()),
};Trait Implementations§
source§impl<'de, T> Deserialize<'de> for BinaryKv<T>
impl<'de, T> Deserialize<'de> for BinaryKv<T>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> PartialEq for BinaryKv<T>
impl<T> PartialEq for BinaryKv<T>
impl<T> StructuralPartialEq for BinaryKv<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for BinaryKv<T>where
T: RefUnwindSafe,
impl<T> Send for BinaryKv<T>where
T: Send,
impl<T> Sync for BinaryKv<T>where
T: Sync,
impl<T> Unpin for BinaryKv<T>where
T: Unpin,
impl<T> UnwindSafe for BinaryKv<T>where
T: UnwindSafe,
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