// Copyright (C) Gear Technologies Inc.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
//! Command `claim`
usecrate::app::App;useanyhow::Result;useclap::Parser;usecolored::Colorize;usegear_core::ids::MessageId;/// Claim value from message in the mailbox.
#[derive(Clone, Debug, Parser)]pubstructClaim{/// Message to claim value from.
message_id: MessageId,
}implClaim{pub async fnexec(self, app:&mut App)->Result<()>{let value = app
.signed_api().await?.claim_value(self.message_id).await?.value;println!("Successfully claimed value of {}", value.to_string().blue());Ok(())}}