pub enum MetadataAction {
Get {
id: String,
key: Option<String>,
},
Set {
id: String,
key: String,
value: String,
},
Remove {
id: String,
key: String,
},
}Expand description
Subcommands for the metadata command, which allows users to get, set, or remove metadata key-value pairs associated with a specific bond. The Get variant retrieves the value of a specified metadata key for a given bond, or all metadata if no key is provided. The Set variant updates or adds a metadata key-value pair for a specified bond. The Remove variant deletes a specific metadata key from a given bond. This functionality enables users to manage additional information about their bonds in a flexible way.
Variants§
Get
Print metadata; pass key to read a single value
Set
Set (upsert) one metadata key/value
Fields
Remove
Remove one metadata key
Trait Implementations§
Source§impl FromArgMatches for MetadataAction
impl FromArgMatches for MetadataAction
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Subcommand for MetadataAction
impl Subcommand for MetadataAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for MetadataAction
impl RefUnwindSafe for MetadataAction
impl Send for MetadataAction
impl Sync for MetadataAction
impl Unpin for MetadataAction
impl UnsafeUnpin for MetadataAction
impl UnwindSafe for MetadataAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more