pub trait KeyValueDbTraitSingleWriter: KeyValueDbTraitOwnedRead {
// Required methods
fn delete(&mut self, key: &[u8]) -> Result<Option<Option<Self::ValueType>>>;
fn put(
&mut self,
key: &[u8],
value: &<Self::ValueType as DbValueType>::Type
) -> Result<Option<Option<Self::ValueType>>>;
// Provided methods
fn delete_with_number_key(
&mut self,
key: i64
) -> Result<Option<Option<Self::ValueType>>> { ... }
fn put_with_number_key(
&mut self,
key: i64,
value: &<Self::ValueType as DbValueType>::Type
) -> Result<Option<Option<Self::ValueType>>> { ... }
}
Required Methods§
sourcefn delete(&mut self, key: &[u8]) -> Result<Option<Option<Self::ValueType>>>
fn delete(&mut self, key: &[u8]) -> Result<Option<Option<Self::ValueType>>>
Return Some(maybe_old_value) or None if the db don’t support reading the old value at deletion.