From f8267c8303c7393391eae28d2c528fd89ea98040 Mon Sep 17 00:00:00 2001 From: Rohit Joshi Date: Mon, 25 Feb 2019 12:02:24 -0500 Subject: [PATCH] updating rust doc --- src/backup.rs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/backup.rs b/src/backup.rs index f53e918..4106818 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -78,11 +78,18 @@ impl BackupEngine { Ok(()) } } + /// Restore from the latest backup - /// db_dir: input db directory - /// wal_dir: input wal directory - /// opts: restore options - /// example: + /// + /// # Arguments + /// + /// * `db_dir` - A path to the database directory + /// * `wal_dir` - A path to the wal directory + /// * `opts` - Restore options + /// + /// # Example + /// + /// ```ignore /// use rocksdb::backup::{BackupEngine, BackupEngineOptions}; /// let backup_opts = BackupEngineOptions::default(); /// let backup_engine = BackupEngine::open(&backup_opts, &backup_path).unwrap(); @@ -92,10 +99,11 @@ impl BackupEngine { /// error!("Failed to restore from the backup. Error:{:?}", e); /// return Err(e.to_string()); /// } - pub fn restore_from_latest_backup>( + /// ``` + pub fn restore_from_latest_backup,W: AsRef>( &mut self, - db_dir: P, - wal_dir: P, + db_dir: D, + wal_dir: W, opts: &RestoreOptions, ) -> Result<(), Error> { let db_dir = db_dir.as_ref();