pub struct LineIndex { /* private fields */ }Implementations§
Source§impl LineIndex
impl LineIndex
pub fn new(text: &str) -> Self
pub fn line_count(&self) -> usize
pub fn line(&self, line: usize) -> Option<Range<usize>>
pub fn position(&self, text: &str, offset: usize) -> Option<Position>
Trait Implementations§
Auto Trait Implementations§
impl Forget for LineIndex
impl Freeze for LineIndex
impl Move 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