pub struct VariantLiteralParser(pub &'static str);Expand description
A parser that matches a specific string literal as an enum variant name.
Similar to LiteralParser, but returns ParseErrorKind::UnknownVariant
on mismatch instead of ParseErrorKind::LiteralMismatch. This provides
better error messages when parsing unit enum variants as string literals.
Tuple Fields§
§0: &'static strTrait Implementations§
Source§impl<'doc> DocumentParser<'doc> for VariantLiteralParser
impl<'doc> DocumentParser<'doc> for VariantLiteralParser
Auto Trait Implementations§
impl Freeze for VariantLiteralParser
impl RefUnwindSafe for VariantLiteralParser
impl Send for VariantLiteralParser
impl Sync for VariantLiteralParser
impl Unpin for VariantLiteralParser
impl UnwindSafe for VariantLiteralParser
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