pub struct OptSpec<'a, Ctx: ?Sized> { /* private fields */ }Expand description
An option/flag specification.
Implementations§
Source§impl<'a, Ctx: ?Sized> OptSpec<'a, Ctx>
impl<'a, Ctx: ?Sized> OptSpec<'a, Ctx>
Sourcepub const fn new(name: &'a str, cb: OptCallback<Ctx>) -> Self
pub const fn new(name: &'a str, cb: OptCallback<Ctx>) -> Self
Create a new option.
Sourcepub const fn at_most_one(self, group_id: u16) -> Self
pub const fn at_most_one(self, group_id: u16) -> Self
Set at most one state and group identifier.
Sourcepub const fn at_least_one(self, group_id: u16) -> Self
pub const fn at_least_one(self, group_id: u16) -> Self
Set at least one state and group identifier.
Trait Implementations§
impl<'a, Ctx: Copy + ?Sized> Copy for OptSpec<'a, Ctx>
Auto Trait Implementations§
impl<'a, Ctx> Freeze for OptSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> RefUnwindSafe for OptSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> Send for OptSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> Sync for OptSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> Unpin for OptSpec<'a, Ctx>where
Ctx: ?Sized,
impl<'a, Ctx> UnwindSafe for OptSpec<'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