pub struct QuotedStringParser;
Expand description
Parser for text that meets the “quoted-string” grammar.
use quoted_string_parser::{QuotedStringParser, QuotedStringParseLevel};
// two qdtexts separated by a whitespace
assert!(QuotedStringParser::validate(
QuotedStringParseLevel::QuotedString, "\"Hello world\""));
// one quoted-pair
assert!(QuotedStringParser::validate(
QuotedStringParseLevel::QuotedString, "\"\\\u{7f}\""));
QuotedStringParser derives from Parser, if you need more control over the parser itself you can use any of the operations defined in the pest crate. Check the documentation for more information.
Implementations§
Source§impl QuotedStringParser
impl QuotedStringParser
Sourcepub fn validate(lvl: QuotedStringParseLevel, input: &str) -> bool
pub fn validate(lvl: QuotedStringParseLevel, input: &str) -> bool
Validate that the input meets the grammar
Auto Trait Implementations§
impl Freeze for QuotedStringParser
impl RefUnwindSafe for QuotedStringParser
impl Send for QuotedStringParser
impl Sync for QuotedStringParser
impl Unpin for QuotedStringParser
impl UnwindSafe for QuotedStringParser
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