pub struct ExpectedArg {
pub cli_name: String,
pub rust_name: String,
pub kind: ArgKind,
}Expand description
What a handler expects for a single parameter.
Generated by the #[handler] macro via handler_name__expected_args().
Fields§
§cli_name: StringThe CLI argument name (e.g., “in-progress”)
rust_name: StringThe Rust parameter name (e.g., “in_progress”)
kind: ArgKindWhat kind of argument this is
Implementations§
Source§impl ExpectedArg
impl ExpectedArg
Sourcepub fn flag(cli_name: impl Into<String>, rust_name: impl Into<String>) -> Self
pub fn flag(cli_name: impl Into<String>, rust_name: impl Into<String>) -> Self
Create an expected flag.
Sourcepub fn required_arg(
cli_name: impl Into<String>,
rust_name: impl Into<String>,
) -> Self
pub fn required_arg( cli_name: impl Into<String>, rust_name: impl Into<String>, ) -> Self
Create an expected required argument.
Trait Implementations§
Source§impl Clone for ExpectedArg
impl Clone for ExpectedArg
Source§fn clone(&self) -> ExpectedArg
fn clone(&self) -> ExpectedArg
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExpectedArg
impl RefUnwindSafe for ExpectedArg
impl Send for ExpectedArg
impl Sync for ExpectedArg
impl Unpin for ExpectedArg
impl UnwindSafe for ExpectedArg
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