pub struct LineIndex { /* private fields */ }Implementations§
Source§impl LineIndex
impl LineIndex
pub fn new(source: &str) -> Self
pub fn source_position(&self, source: &str, byte: usize) -> SourcePosition
pub fn byte_for_line_character( &self, source: &str, line: usize, character: usize, ) -> Option<usize>
pub fn utf16_position(&self, source: &str, byte: usize) -> Utf16Position
pub fn byte_for_utf16_position( &self, source: &str, line: usize, character: usize, ) -> Option<usize>
pub fn source_range(&self, source: &str, span: Span) -> SourceRange
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineIndex
impl RefUnwindSafe for LineIndex
impl Send for LineIndex
impl Sync for LineIndex
impl Unpin for LineIndex
impl UnsafeUnpin for LineIndex
impl UnwindSafe for LineIndex
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