pub struct Buffer { /* private fields */ }Implementations§
Source§impl Buffer
impl Buffer
pub fn name(&self) -> &Option<String>
pub fn idx_of_position(&self, pos: &Position) -> usize
pub fn char_at_pos(&self, pos: &Position) -> char
pub fn line(&self, y: usize) -> String
pub fn line_len(&self, y: usize) -> usize
pub fn len_chars(&self) -> usize
pub fn len_lines(&self) -> usize
pub fn line_to_char(&self, line: usize) -> usize
pub fn char_to_line(&self, line: usize) -> usize
pub fn insert_char(&mut self, idx: usize, c: char)
pub fn remove(&mut self, range: Range<usize>)
pub fn contents(&self) -> String
pub fn clear(&mut self)
pub fn on_screen(&self, top: usize, bottom: usize) -> String
pub fn write_to<T: Write>(&self, writer: T) -> Result<()>
pub fn next_jump_idx(&self, pos: &Position) -> Option<usize>
pub fn prev_jump_idx(&self, pos: &Position) -> Option<usize>
Trait Implementations§
impl Eq for Buffer
impl StructuralPartialEq for Buffer
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
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