Struct quoted_string_parser::QuotedStringParser
source · [−]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
sourceimpl 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 RefUnwindSafe for QuotedStringParser
impl Send for QuotedStringParser
impl Sync for QuotedStringParser
impl Unpin for QuotedStringParser
impl UnwindSafe for QuotedStringParser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more