driver_tools/subcommands/node/subcommands/add/
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 argh::{ArgsInfo, FromArgs};
6
7#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
8#[argh(
9    subcommand,
10    name = "add",
11    description = "Add a node with a given bind property",
12    example = "To add a node to the driver framework:
13
14    $ driver node add my-node my-key-string=my-value-string",
15    error_code(1, "Failed to connect to the driver development service")
16)]
17pub struct AddNodeCommand {
18    /// the name of the node.
19    #[argh(positional)]
20    pub name: String,
21
22    /// the node's property. Should be in the format key=value.
23    #[argh(positional)]
24    pub property: String,
25}