Use `LeveldbOrm` + `leveldb_key` to auto impl trait in [leveldb-orm](https://crates.io/crates/leveldb-orm) ```rust #[derive(LeveldbOrm)] #[leveldb_key(executable, args)] struct Command { pub executable: u8, pub args: Vec, pub current_dir: Option, } ``` # Generate code ```rust impl<'a> leveldb_orm::KeyOrm<'a> for Command { type KeyType = (u8, Vec); type KeyTypeRef = (&'a u8, &'a Vec); #[inline] fn key( &self, ) -> std::result::Result, Box> { Self::encode_key((&self.executable, &self.args)) } } ```