diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-12-31 10:37:13 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-12-31 10:37:13 +0000 |
commit | 4e0c91dcb2c9f0c362e579a8d0142936d413c235 (patch) | |
tree | 1ce0288f878cac71990bb01f358d6035f1626c92 /src/cmd/list_files.rs | |
parent | 686e87981db210fa443404c8473dfe7a3f39b241 (diff) | |
parent | acf1ba3f8f1492b961c9a6eb09eb93e882f5eb3f (diff) | |
download | obnam2-4e0c91dcb2c9f0c362e579a8d0142936d413c235.tar.gz |
Merge branch 'docs' into 'main'
docs: add documentation comments to crate
Closes #151
See merge request obnam/obnam!200
Diffstat (limited to 'src/cmd/list_files.rs')
-rw-r--r-- | src/cmd/list_files.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/list_files.rs b/src/cmd/list_files.rs index bdec55b..888943e 100644 --- a/src/cmd/list_files.rs +++ b/src/cmd/list_files.rs @@ -1,3 +1,5 @@ +//! The `list-files` subcommand. + use crate::backup_reason::Reason; use crate::client::AsyncBackupClient; use crate::config::ClientConfig; @@ -7,13 +9,16 @@ use structopt::StructOpt; use tempfile::NamedTempFile; use tokio::runtime::Runtime; +/// List files in a backup. #[derive(Debug, StructOpt)] pub struct ListFiles { + /// Reference to backup to list files in. #[structopt(default_value = "latest")] gen_id: String, } impl ListFiles { + /// Run the command. pub fn run(&self, config: &ClientConfig) -> Result<(), ObnamError> { let rt = Runtime::new()?; rt.block_on(self.run_async(config)) |