(matches: &ArgMatches)
| 278 | // Arg parsers |
| 279 | |
| 280 | fn parse_trigger(matches: &ArgMatches) -> Result<Trigger, CliError> { |
| 281 | if matches.is_present("account") { |
| 282 | return Ok(Trigger::Account { |
| 283 | address: parse_pubkey("address", matches)?, |
| 284 | offset: 0, // TODO |
| 285 | size: 32, // TODO |
| 286 | }); |
| 287 | } else if matches.is_present("cron") { |
| 288 | return Ok(Trigger::Cron { |
| 289 | schedule: parse_string("cron", matches)?, |
| 290 | skippable: true, |
| 291 | }); |
| 292 | } else if matches.is_present("now") { |
| 293 | return Ok(Trigger::Now); |
| 294 | } |
| 295 | |
| 296 | Err(CliError::BadParameter("trigger".into())) |
| 297 | } |
| 298 | |
| 299 | fn parse_instruction_file( |
| 300 | arg: &str, |
no test coverage detected