pub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
    where
        K: AsRef<[u8]>,
        V: AsRef<[u8]>,
    {
        let key = key.as_ref();
        let value = value.as_ref();

        unsafe {
            ffi::rocksdb_writebatch_put(
                self.inner,
                key.as_ptr() as *const c_char,
                key.len() as size_t,
                value.as_ptr() as *const c_char,
                value.len() as size_t,
            );
            Ok(())
        }
    }
/// Insert a value into the database under the given key.
Insert a value into the database under the given key.
Insert a value into the database under the given key .
pub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
    where
        K: AsRef<[u8]>,
        V: AsRef<[u8]>,
    {
        let key = key.as_ref();
        let value = value.as_ref();
        unsafe {
            ffi::rocksdb_writebatch_put(
                self.inner,
                key.as_ptr() as *const c_char,
                key.len() as size_t,
                value.as_ptr() as *const c_char,
                value.len() as size_t,
            );
            Ok(())
        }
    }
pub fn put < K , V > ( & mut self , key : K , value : V ) -> Result < ( ) , Error > where K : AsRef < [ u8 ] > , V : AsRef < [ u8 ] > , { let key = key . as_ref ( ) ; let value = value . as_ref ( ) ; unsafe { ffi :: rocksdb_writebatch_put ( self . inner , key . as_ptr ( ) as * const c_char , key . len ( ) as size_t , value . as_ptr ( ) as * const c_char , value . len ( ) as size_t , ) ; Ok ( ( ) ) } }
Insert a value into the database under the given key.
Insert a value into the database under the given key .
&mut self
key
K
value
V
&mut self
key
K
value
V