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, Global>) -> 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) -> usize
pub fn position(&self, p: usize) -> FilePos
Trait Implementations§
Auto Trait Implementations§
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