[−][src]Trait orga::store::Write
Trait for write access to key/value stores.
Required methods
fn put(&mut self, key: Vec<u8>, value: Vec<u8>) -> Result<()>
Writes a key and value to the store.
If a value already exists for the given key, implementations should overwrite the value.
fn delete(&mut self, key: &[u8]) -> Result<()>
Deletes the value with the given key.
If no value exists for the given key, implementations should treat the
operation as a no-op (but may still issue a call to delete
to an
underlying store).
Provided methods
Loading content...Implementors
impl Write for MemStore
[src]
fn put(&mut self, key: Vec<u8>, value: Vec<u8>) -> Result<()>
[src]
fn delete(&mut self, key: &[u8]) -> Result<()>
[src]
impl Write for NullStore
[src]
fn put(&mut self, _key: Vec<u8>, _value: Vec<u8>) -> Result<()>
[src]
fn delete(&mut self, _key: &[u8]) -> Result<()>
[src]
impl<'a> Write for MerkStore<'a>
[src]
fn put(&mut self, key: Vec<u8>, value: Vec<u8>) -> Result<()>
[src]
Writes a value to the underlying Merk
store.
fn delete(&mut self, key: &[u8]) -> Result<()>
[src]
Deletes a value from the underlying Merk
store.