pub struct ParamSpec {
pub name: &'static str,
pub kind: ParamKind,
pub default: Option<&'static str>,
pub help: &'static str,
pub choices: &'static [&'static str],
pub repeatable: bool,
pub required: bool,
pub short: Option<char>,
pub range: Option<&'static str>,
pub advanced: bool,
}Expand description
Definition of one parameter.
Fields§
§name: &'static strkebab-case name; the CLI flag is --<name>, pipeline keys use underscores.
kind: ParamKind§default: Option<&'static str>§help: &'static str§choices: &'static [&'static str]§repeatable: bool§required: bool§short: Option<char>§range: Option<&'static str>Allowed numeric range for documentation, e.g. “8..64”.
advanced: boolHidden from the compact agent catalog (still documented in full reference).
Implementations§
Source§impl ParamSpec
impl ParamSpec
pub fn default(self, d: &'static str) -> Self
pub fn help(self, h: &'static str) -> Self
pub fn choices(self, c: &'static [&'static str]) -> Self
pub fn repeatable(self) -> Self
pub fn required(self) -> Self
pub fn short(self, c: char) -> Self
pub fn range(self, r: &'static str) -> Self
pub fn advanced(self) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamSpec
impl RefUnwindSafe for ParamSpec
impl Send for ParamSpec
impl Sync for ParamSpec
impl Unpin for ParamSpec
impl UnsafeUnpin for ParamSpec
impl UnwindSafe for ParamSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more