Skip to content

Commit 518d439

Browse files
authored
docs(iroh-cli): update rpc command documentation (#2711)
## Description <!-- A summary of what this pull request achieves and a rough list of changes. --> Update documentation to tags command. This partially addresses #2660, and belongs to a series of PRs to complete it. ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> Imports have been formated to be grouped. ## Change checklist - [ ] Self-review. - [X] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
1 parent 2636be8 commit 518d439

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

iroh-cli/src/commands/rpc.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
use anyhow::Result;
2-
use clap::Subcommand;
3-
use iroh::client::Iroh;
4-
5-
use crate::config::ConsoleEnv;
1+
//! Define the subcommands to manage the iroh RPC.
62
73
use super::{
84
authors::AuthorCommands, blobs::BlobCommands, docs::DocCommands, gossip::GossipCommands,
95
net::NetCommands, tags::TagCommands,
106
};
7+
use crate::config::ConsoleEnv;
8+
use anyhow::Result;
9+
use clap::Subcommand;
10+
use iroh::client::Iroh;
1111

12+
/// Commands to manage the iroh RPC.
1213
#[derive(Subcommand, Debug, Clone)]
1314
#[allow(clippy::large_enum_variant)]
1415
pub enum RpcCommands {
15-
/// Manage documents
16+
/// Manage iroh's documents.
1617
///
1718
/// Documents are mutable, syncable key-value stores.
1819
/// For more on docs see https://iroh.computer/docs/layers/documents
@@ -23,7 +24,7 @@ pub enum RpcCommands {
2324
command: DocCommands,
2425
},
2526

26-
/// Manage document authors
27+
/// Manage iroh's document authors.
2728
///
2829
/// Authors are keypairs that identify writers to documents.
2930
///
@@ -88,6 +89,7 @@ pub enum RpcCommands {
8889
}
8990

9091
impl RpcCommands {
92+
/// Run the RPC command given the iroh client and the console environment.
9193
pub async fn run(self, iroh: &Iroh, env: &ConsoleEnv) -> Result<()> {
9294
match self {
9395
Self::Net { command } => command.run(iroh).await,

0 commit comments

Comments
 (0)