| // Copyright 2026 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| use argh::{ArgsInfo, FromArgs}; | |
| use ffx_core::ffx_command; | |
| use ffx_target_registry_sub_command::SubCommand; | |
| #[ffx_command()] | |
| #[derive(ArgsInfo, FromArgs, Debug, PartialEq)] | |
| #[argh( | |
| subcommand, | |
| name = "registry", | |
| description = "Manage strict mode's target registry", | |
| note = "In strict mode (`ffx --strict`), ffx does not discover targets when it | |
| resolves a target name or serial number (`id:<serial>`). It looks the target up | |
| in the registry, `$SHARED_DATA/targets.json`, and connects to the address | |
| recorded there. | |
| The registry is authoritative: an entry stays until the registry is replaced, | |
| whether or not the target is currently reachable. | |
| Use `set` to replace the registry once, and `watch` to keep the addresses of | |
| targets current while they change, for example across reboots." | |
| )] | |
| pub struct RegistryCommand { | |
| #[argh(subcommand)] | |
| pub subcommand: SubCommand, | |
| } |