fn put(&mut self, key: &[u8], value: &[u8]) -> Result<(), DatabaseError> {
        self.txn
            .access()
            .put(&self.db.main, key, value, lmdb::put::NOOVERWRITE)
            .map_err(|err| match err {
                lmdb::error::Error::Code(lmdb::error::KEYEXIST) => DatabaseError::DuplicateEntry,
                _ => DatabaseError::WriterError(format!("{}", err)),
            })
    }
/// Writes the given key/value pair. If the key/value pair already exists,
/// it will return a DatabaseError::DuplicateEntry.
Writes the given key/value pair. If the key/value pair already exists,
it will return a DatabaseError::DuplicateEntry.
Writes the given key / value pair . If the key / value pair already exists it will return a DatabaseError :: DuplicateEntry .
fn put(&mut self, key: &[u8], value: &[u8]) -> Result<(), DatabaseError> {
        self.txn
            .access()
            .put(&self.db.main, key, value, lmdb::put::NOOVERWRITE)
            .map_err(|err| match err {
                lmdb::error::Error::Code(lmdb::error::KEYEXIST) => DatabaseError::DuplicateEntry,
                _ => DatabaseError::WriterError(format!("{}", err)),
            })
    }
fn put ( & mut self , key : & [ u8 ] , value : & [ u8 ] ) -> Result < ( ) , DatabaseError > { self . txn . access ( ) . put ( & self . db . main , key , value , lmdb :: put :: NOOVERWRITE ) . map_err ( | err | match err { lmdb :: error :: Error :: Code ( lmdb :: error :: KEYEXIST ) => DatabaseError :: DuplicateEntry , _ => DatabaseError :: WriterError ( format ! ( " " err ) ) , } ) }
Writes the given key/value pair.
Writes the given key / value pair .
&mut self
key
&[u8]
value
&[u8]
&mut self
key
&[u8]
value
&[u8]