pub struct OptSpec<'a, U> { /* private fields */ }Expand description
An option/flag specification.
Implementations§
Source§impl<'a, U> OptSpec<'a, U>
impl<'a, U> OptSpec<'a, U>
Sourcepub const fn new(name: &'a str, cb: OptCallback<U>) -> Self
pub const fn new(name: &'a str, cb: OptCallback<U>) -> 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§
Auto Trait Implementations§
impl<'a, U> Freeze for OptSpec<'a, U>
impl<'a, U> RefUnwindSafe for OptSpec<'a, U>
impl<'a, U> Send for OptSpec<'a, U>
impl<'a, U> Sync for OptSpec<'a, U>
impl<'a, U> Unpin for OptSpec<'a, U>
impl<'a, U> UnwindSafe for OptSpec<'a, U>
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