pub(crate) struct PathTokens<'a> {
chars: Peekable<CharIndices<'a>>,
end: usize,
}Expand description
A tokenizer for dot separated keys that tracks byte offsets.
Fields§
§chars: Peekable<CharIndices<'a>>§end: usizeImplementations§
Source§impl<'a> PathTokens<'a>
impl<'a> PathTokens<'a>
Sourcepub(crate) fn parse(text: &'a str) -> Result<Vec<String>, OwnershipError>
pub(crate) fn parse(text: &'a str) -> Result<Vec<String>, OwnershipError>
Split text into keys.
§Errors
Returns OwnershipError::PathEmpty for empty text and
OwnershipError::PathSyntax for text that breaks the grammar.
fn new(text: &'a str) -> Self
fn offset(&mut self) -> usize
fn error(&mut self, kind: PathSyntaxError) -> OwnershipError
fn eat(&mut self, expected: char) -> bool
fn keys(self) -> Result<Vec<String>, OwnershipError>
fn key(&mut self) -> Result<String, OwnershipError>
fn bare(&mut self) -> Result<String, OwnershipError>
fn quoted(&mut self) -> Result<String, OwnershipError>
Auto Trait Implementations§
impl<'a> Freeze for PathTokens<'a>
impl<'a> RefUnwindSafe for PathTokens<'a>
impl<'a> Send for PathTokens<'a>
impl<'a> Sync for PathTokens<'a>
impl<'a> Unpin for PathTokens<'a>
impl<'a> UnsafeUnpin for PathTokens<'a>
impl<'a> UnwindSafe for PathTokens<'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