pub struct Param {
pub name: &'static str,
pub kind: Kind,
pub required: bool,
pub positional: bool,
pub description: &'static str,
}Expand description
One parameter a command takes.
Fields§
§name: &'static strThe name, which is the MCP property name and the CLI’s --name.
kind: KindWhat kind of value it takes.
required: boolWhether the command refuses without it.
positional: boolWhether it can be given as a bare word on the command line.
At most one positional per command, and it is always the first one: a command line with two unnamed arguments is one nobody can read back.
description: &'static strWhat it is for, in one sentence.
This is what the model reads. A parameter whose description says “the table” tells an agent nothing it could not guess; one that says which name form is expected saves a failed call. The parity test refuses an empty one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Param
impl RefUnwindSafe for Param
impl Send for Param
impl Sync for Param
impl Unpin for Param
impl UnsafeUnpin for Param
impl UnwindSafe for Param
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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