Struct bonsaidb::core::schema::MappedValue
pub struct MappedValue<K, V>where
K: for<'a> Key<'a>,{
pub key: K,
pub value: V,
}
Expand description
A key value pair
Fields§
§key: K
The key responsible for generating the value
value: V
The value generated by the View
Implementations§
§impl<K, V> MappedValue<K, V>where
K: for<'a> Key<'a>,
impl<K, V> MappedValue<K, V>where
K: for<'a> Key<'a>,
pub fn new(key: K, value: V) -> MappedValue<K, V>
pub fn new(key: K, value: V) -> MappedValue<K, V>
Returns a new instance with the key/value pair.
Trait Implementations§
§impl<K, V> Clone for MappedValue<K, V>where
K: Clone + for<'a> Key<'a>,
V: Clone,
impl<K, V> Clone for MappedValue<K, V>where
K: Clone + for<'a> Key<'a>,
V: Clone,
§fn clone(&self) -> MappedValue<K, V>
fn clone(&self) -> MappedValue<K, V>
Returns a copy 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 more