pub struct LexedStr<'a> { /* private fields */ }
Implementations§
source§impl<'a> LexedStr<'a>
impl<'a> LexedStr<'a>
pub fn new(edition: Edition, text: &'a str) -> LexedStr<'a>
pub fn single_token( edition: Edition, text: &'a str, ) -> Option<(SyntaxKind, Option<String>)>
pub fn as_str(&self) -> &str
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn kind(&self, i: usize) -> SyntaxKind
pub fn text(&self, i: usize) -> &str
pub fn range_text(&self, r: Range<usize>) -> &str
pub fn text_range(&self, i: usize) -> Range<usize>
pub fn text_start(&self, i: usize) -> usize
pub fn text_len(&self, i: usize) -> usize
pub fn error(&self, i: usize) -> Option<&str>
pub fn errors(&self) -> impl Iterator<Item = (usize, &str)> + '_
Auto Trait Implementations§
impl<'a> Freeze for LexedStr<'a>
impl<'a> RefUnwindSafe for LexedStr<'a>
impl<'a> Send for LexedStr<'a>
impl<'a> Sync for LexedStr<'a>
impl<'a> Unpin for LexedStr<'a>
impl<'a> UnwindSafe for LexedStr<'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