pub struct TextParser<'a> {
data: Value,
text: Vec<&'a str>,
pos: usize,
len: usize,
}
Available on crate feature
artemis
only.Fields§
§data: Value
§text: Vec<&'a str>
§pos: usize
§len: usize
Implementations§
Source§impl<'a> TextParser<'a>
impl<'a> TextParser<'a>
pub fn new(str: &'a str) -> Self
pub fn parse(self) -> Result<Value>
fn parse_array(&mut self) -> Result<()>
fn parse_any_number(&mut self) -> Result<Value>
fn parse_key(&mut self) -> Result<String>
fn parse_str(&mut self) -> Result<Value>
fn eat_char(&mut self)
fn erase_whitespace(&mut self)
fn is_indent(&self, indent: &str) -> bool
fn parse_indent(&mut self, indent: &str) -> Result<()>
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