driver_tools/subcommands/list/
args.rs

1// Copyright 2022 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 argh::{ArgsInfo, FromArgs};
6
7#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
8#[argh(
9    subcommand,
10    name = "list",
11    description = "List drivers",
12    example = "To list all drivers with properties:
13
14    $ driver list -v
15
16To list only loaded drivers:
17
18    $ driver list --loaded",
19    error_code(1, "Failed to connect to the driver development service")
20)]
21pub struct ListCommand {
22    /// list all driver properties
23    #[argh(switch, short = 'v', long = "verbose")]
24    pub verbose: bool,
25
26    /// only list loaded drivers
27    #[argh(switch, long = "loaded")]
28    pub loaded: bool,
29
30    /// if this exists, the user will be prompted for a component to select.
31    #[argh(switch, short = 's', long = "select")]
32    pub select: bool,
33}