Struct meap::parser::ChooseAtMostOne
source · pub struct ChooseAtMostOne<PA: Parser, PB: Parser>(_, _);
Implementations§
source§impl<T, PA: Parser<Item = Option<T>>, PB: Parser<Item = Option<T>>> ChooseAtMostOne<PA, PB>
impl<T, PA: Parser<Item = Option<T>>, PB: Parser<Item = Option<T>>> ChooseAtMostOne<PA, PB>
pub fn with_default_general(self, value: T) -> WithDefaultGeneral<T, Self>
pub fn with_default_lazy_general<F: FnOnce() -> T>( self, f: F ) -> WithDefaultLazyGeneral<T, F, Self>
pub fn required_general<S: AsRef<str>>( self, error_message: S ) -> RequiredGeneral<Self>
Trait Implementations§
source§impl<T, PA: Parser<Item = Option<T>>, PB: Parser<Item = Option<T>>> Parser for ChooseAtMostOne<PA, PB>
impl<T, PA: Parser<Item = Option<T>>, PB: Parser<Item = Option<T>>> Parser for ChooseAtMostOne<PA, PB>
type Item = Option<T>
fn register_low_level(&self, ll: &mut LowLevelParser) -> Result<(), SpecError>
fn parse_low_level( &mut self, ll: &mut LowLevelParserOutput ) -> Result<Self::Item, Box<dyn Error>>
fn update_help(&self, help: &mut Help)
fn parse_args<A: IntoIterator<Item = String>>( self, program_name: String, args: A ) -> Result<Self::Item, (Box<dyn Error>, SpentParser<Self>)>
fn parse_env(self) -> Result<Self::Item, (Box<dyn Error>, SpentParser<Self>)>
fn both<PU: Parser>(self, other: PU) -> Both<Self::Item, PU::Item, Self, PU>
fn map<U, F: FnOnce(Self::Item) -> U>(self, f: F) -> Map<Self::Item, U, F, Self>
fn with_help<N: IntoName>(self, name: N) -> WithHelp<Self::Item, Self>
fn with_help_default(self) -> WithHelp<Self::Item, Self>
fn with_default_general<T>(self, value: T) -> WithDefaultGeneral<T, Self>
fn choose_at_most_one<O: Parser>(self, other: O) -> ChooseAtMostOne<Self, O>
fn with_default_lazy_general<T, F: FnOnce() -> T>( self, f: F ) -> WithDefaultLazyGeneral<T, F, Self>
fn required_general<S: AsRef<str>>( self, error_message: S ) -> RequiredGeneral<Self>
Auto Trait Implementations§
impl<PA, PB> RefUnwindSafe for ChooseAtMostOne<PA, PB>where PA: RefUnwindSafe, PB: RefUnwindSafe,
impl<PA, PB> Send for ChooseAtMostOne<PA, PB>where PA: Send, PB: Send,
impl<PA, PB> Sync for ChooseAtMostOne<PA, PB>where PA: Sync, PB: Sync,
impl<PA, PB> Unpin for ChooseAtMostOne<PA, PB>where PA: Unpin, PB: Unpin,
impl<PA, PB> UnwindSafe for ChooseAtMostOne<PA, PB>where PA: UnwindSafe, PB: UnwindSafe,
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