pub struct PosSpec<'a, Ctx: ?Sized> { /* private fields */ }Expand description
Positional argument specification.
Implementations§
Source§impl<'a, Ctx: ?Sized> PosSpec<'a, Ctx>
impl<'a, Ctx: ?Sized> PosSpec<'a, Ctx>
pub const fn new(name: &'a str, cb: OnValue<Ctx>) -> Self
pub const fn help(self, h: &'a str) -> Self
pub const fn required(self) -> Self
pub const fn many(self) -> Self
pub const fn range(self, min: usize, max: usize) -> Self
pub const fn validator(self, v: ValueValidator) -> Self
pub const fn get_name(&self) -> &str
pub const fn get_help(&self) -> Option<&str>
pub const fn get_cardinality(&self) -> PosCardinality
pub const fn is_required(&self) -> bool
pub const fn is_multiple(&self) -> bool
pub const fn get_on_value(&self) -> OnValue<Ctx>
pub const fn get_validator(&self) -> Option<ValueValidator>
Auto Trait Implementations§
impl<'a, Ctx> Freeze for PosSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> RefUnwindSafe for PosSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> Send for PosSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> Sync for PosSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> Unpin for PosSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> UnwindSafe for PosSpec<'a, Ctx>where
Ctx: ?Sized,
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