struct Parser<'a> {
input: &'a str,
cursor: usize,
}Fields§
§input: &'a str§cursor: usizeImplementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
const fn new(input: &'a str) -> Self
fn parse(&mut self) -> Result<NbtPath, NbtPathError>
fn parse_node(&mut self, first_node: bool) -> Result<NbtPathNode, NbtPathError>
fn read_object_node( &mut self, name: String, ) -> Result<NbtPathNode, NbtPathError>
fn parse_element_node(&mut self) -> Result<NbtPathNode, NbtPathError>
fn parse_compound_pattern(&mut self) -> Result<NbtCompound, NbtPathError>
fn parse_unquoted_name(&mut self) -> Result<String, NbtPathError>
fn parse_quoted_string(&mut self) -> Result<String, NbtPathError>
fn parse_i32(&mut self) -> Result<i32, NbtPathError>
const fn can_read(&self) -> bool
fn peek(&self) -> Option<char>
fn read(&mut self) -> Option<char>
fn expect_char(&mut self, expected: char) -> Result<(), NbtPathError>
const fn error(&self, kind: NbtPathErrorKind) -> NbtPathError
const fn error_at(cursor: usize, kind: NbtPathErrorKind) -> NbtPathError
Auto Trait Implementations§
impl<'a> Freeze for Parser<'a>
impl<'a> RefUnwindSafe for Parser<'a>
impl<'a> Send for Parser<'a>
impl<'a> Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnsafeUnpin for Parser<'a>
impl<'a> UnwindSafe for Parser<'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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreWraps this value in an
Arc<SyncMutex<>>