Skip to main content

powercli/
args.rs

1// Copyright 2025 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use super::collaborative_reboot::args::CollaborativeRebootCommand;
6use super::debugcmd::args::DebugCommand;
7use super::system_activity::args::SystemActivityCommand;
8use argh::{ArgsInfo, FromArgs, TopLevelCommand};
9
10#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
11#[argh(subcommand, name = "power", description = "Control system power features")]
12pub struct PowerCommand {
13    #[argh(subcommand)]
14    pub subcommand: PowerSubCommand,
15}
16
17impl TopLevelCommand for PowerCommand {}
18
19#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
20#[argh(subcommand)]
21pub enum PowerSubCommand {
22    CollaborativeReboot(CollaborativeRebootCommand),
23    Debugcmd(DebugCommand),
24    SystemActivity(SystemActivityCommand),
25}