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

Method try_from

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

Source from the content-addressed store, hash-verified

16 type Error = CliError;
17
18 fn try_from(matches: &ArgMatches) -> Result<Self, Self::Error> {
19 match matches.subcommand() {
20 Some(("config", matches)) => parse_config_command(matches),
21 Some(("crontab", matches)) => parse_crontab_command(matches),
22 Some(("delegation", matches)) => parse_delegation_command(matches),
23 Some(("explorer", matches)) => parse_explorer_command(matches),
24 Some(("initialize", matches)) => parse_initialize_command(matches),
25 Some(("localnet", matches)) => parse_bpf_command(matches),
26 Some(("pool", matches)) => parse_pool_command(matches),
27 Some(("secret", matches)) => parse_secret_command(matches),
28 Some(("thread", matches)) => parse_thread_command(matches),
29 Some(("registry", matches)) => parse_registry_command(matches),
30 Some(("webhook", matches)) => parse_webhook_command(matches),
31 Some(("worker", matches)) => parse_worker_command(matches),
32 _ => Err(CliError::CommandNotRecognized(
33 matches.subcommand().unwrap().0.into(),
34 )),
35 }
36 }
37}
38
39// Command parsers

Callers

nothing calls this directly

Calls 12

parse_config_commandFunction · 0.85
parse_crontab_commandFunction · 0.85
parse_delegation_commandFunction · 0.85
parse_explorer_commandFunction · 0.85
parse_initialize_commandFunction · 0.85
parse_bpf_commandFunction · 0.85
parse_pool_commandFunction · 0.85
parse_secret_commandFunction · 0.85
parse_thread_commandFunction · 0.85
parse_registry_commandFunction · 0.85
parse_webhook_commandFunction · 0.85
parse_worker_commandFunction · 0.85

Tested by

no test coverage detected