struct TextParser<'a> {
items: Vec<Item>,
text: Vec<&'a str>,
pos: usize,
len: usize,
hcls_index: usize,
}
Available on crate feature
artemis
only.Fields§
§items: Vec<Item>
§text: Vec<&'a str>
§pos: usize
§len: usize
§hcls_index: usize
Implementations§
Source§impl<'a> TextParser<'a>
impl<'a> TextParser<'a>
pub fn new(str: &'a str, hcls_index: usize) -> Self
pub fn parse(self) -> Result<Vec<Item>>
fn parse_tag(&mut self) -> Result<()>
fn parse_key(&mut self) -> Result<String>
fn parse_str(&mut self) -> Result<String>
fn erase_whitespace(&mut self)
fn parse_indent(&mut self, indent: &str) -> Result<()>
fn eat_char(&mut self)
fn next(&mut self) -> Option<&'a str>
fn peek(&self) -> Option<&'a str>
fn error2<T>(&self, msg: T) -> Errorwhere
T: Display,
fn error<T, A>(&self, msg: T) -> Result<A>where
T: Display,
Auto Trait Implementations§
impl<'a> Freeze for TextParser<'a>
impl<'a> RefUnwindSafe for TextParser<'a>
impl<'a> Send for TextParser<'a>
impl<'a> Sync for TextParser<'a>
impl<'a> Unpin for TextParser<'a>
impl<'a> UnwindSafe for TextParser<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more