blob: 4a334da5a56617a8eb763525f59b25b7d359075f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
use {Command, Result};
use clap;
use rpc;
pub struct Shutdown;
impl Command for Shutdown {
fn name(&self) -> &'static str {
"shutdown"
}
fn clap_subcommand(&self) -> clap::App<'static, 'static> {
clap::SubCommand::with_name(self.name()).about("Makes the backend daemon quit")
}
fn run(&self, _matches: &clap::ArgMatches) -> Result<()> {
rpc::call("shutdown", &[] as &[u8; 0])
}
}
|