pub struct Optional<P> { /* private fields */ }
Trait Implementations§
Source§impl<'input, G, P> Symbol<'input, G> for Optional<P>where
P: Symbol<'input, G>,
impl<'input, G, P> Symbol<'input, G> for Optional<P>where
P: Symbol<'input, G>,
type Output = Option<<P as Symbol<'input, G>>::Output>
fn pretty_print(&self) -> String
fn parse( &self, grammar: &mut G, start: Input<'input>, ) -> ParseResult<'input, Option<P::Output>>
fn parse_complete( &self, grammar: &mut G, text: &'input str, ) -> Result<Self::Output, Error<'input>>
fn parse_prefix( &self, grammar: &mut G, text: &'input str, ) -> ParseResult<'input, Self::Output>
Auto Trait Implementations§
impl<P> Freeze for Optional<P>where
P: Freeze,
impl<P> RefUnwindSafe for Optional<P>where
P: RefUnwindSafe,
impl<P> Send for Optional<P>where
P: Send,
impl<P> Sync for Optional<P>where
P: Sync,
impl<P> Unpin for Optional<P>where
P: Unpin,
impl<P> UnwindSafe for Optional<P>where
P: 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