pub struct File { /* private fields */ }
Implementations§
Source§impl File
impl File
pub fn new(name: String) -> File
pub fn name(&self) -> &str
pub fn base(&self) -> usize
pub fn size(&self) -> usize
pub fn line_count(&self) -> usize
pub fn add_line(&mut self, offset: usize)
pub fn merge_line(&mut self, line: usize)
pub fn set_lines(&mut self, lines: Vec<usize>) -> bool
pub fn set_lines_for_content(&mut self, content: &mut Chars<'_>)
pub fn line_start(&self, line: usize) -> usize
pub fn pos(&self, offset: usize) -> Pos
pub fn position(&self, p: Pos) -> FilePos
Trait Implementations§
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl !Send for File
impl !Sync for File
impl Unpin for File
impl UnwindSafe for File
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