pub struct LineIndex { /* private fields */ }Implementations§
Source§impl LineIndex
impl LineIndex
pub fn new(source: &str) -> Self
pub fn line_col(&self, offset: TextSize) -> ByteLineCol
pub fn char_line_col(&self, offset: TextSize) -> CharLineCol
pub fn utf16_col(&self, line: LineNumber, byte_col: ByteColumn) -> Utf16Offset
pub fn utf16_range(&self, range: TextRange) -> (Utf16Offset, Utf16Offset)
Trait Implementations§
impl Eq for LineIndex
impl StructuralPartialEq for LineIndex
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