MCPcopy Create free account
hub / github.com/clockwork-xyz/clockwork / parse_pool_command

Function parse_pool_command

cli/src/parser.rs:158–172  ·  view source on GitHub ↗
(matches: &ArgMatches)

Source from the content-addressed store, hash-verified

156}
157
158fn parse_pool_command(matches: &ArgMatches) -> Result<CliCommand, CliError> {
159 match matches.subcommand() {
160 Some(("get", matches)) => Ok(CliCommand::PoolGet {
161 id: parse_u64("id", matches)?,
162 }),
163 Some(("update", matches)) => Ok(CliCommand::PoolUpdate {
164 id: parse_u64("id", matches)?,
165 size: parse_usize("size", matches)?,
166 }),
167 Some(("list", _)) => Ok(CliCommand::PoolList {}),
168 _ => Err(CliError::CommandNotRecognized(
169 matches.subcommand().unwrap().0.into(),
170 )),
171 }
172}
173
174fn parse_secret_command(matches: &ArgMatches) -> Result<CliCommand, CliError> {
175 match matches.subcommand() {

Callers 1

try_fromMethod · 0.85

Calls 2

parse_u64Function · 0.85
parse_usizeFunction · 0.85

Tested by

no test coverage detected