pub struct MeshReleaseArgs {
pub claim: String,
pub query: MeshQueryArgs,
}Expand description
mesh release: the one claim to give back, by the <stream>/<claim> key mesh claim
printed when it took it. The key names the stream that made the claim as well as the
claim itself, so a runtime can only release what it holds, and a person who kept the
line mesh claim printed needs nothing else.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshReleaseArgs};
let cli =
Cli::try_parse_from(["majordomus", "mesh", "release", "a1b2c3d4-r1/claim-7"]).unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Release(release) = mesh.command else { panic!("expected `release`") };
assert_eq!(release.claim, "a1b2c3d4-r1/claim-7");
// releasing nothing in particular is not a release
assert!(Cli::try_parse_from(["majordomus", "mesh", "release"]).is_err());Fields§
§claim: StringThe claim’s key, <stream>/<claim>, as mesh claim printed it
query: MeshQueryArgsWhere the repository is and how to answer.
Trait Implementations§
Source§impl Args for MeshReleaseArgs
impl Args for MeshReleaseArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Debug for MeshReleaseArgs
impl Debug for MeshReleaseArgs
Source§impl FromArgMatches for MeshReleaseArgs
impl FromArgMatches for MeshReleaseArgs
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for MeshReleaseArgs
impl RefUnwindSafe for MeshReleaseArgs
impl Send for MeshReleaseArgs
impl Sync for MeshReleaseArgs
impl Unpin for MeshReleaseArgs
impl UnsafeUnpin for MeshReleaseArgs
impl UnwindSafe for MeshReleaseArgs
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