Struct liner::Buffer
[−]
[src]
pub struct Buffer { /* fields omitted */ }
Methods
impl Buffer
[src]
fn new() -> Self
fn clear_actions(&mut self)
fn start_undo_group(&mut self)
fn end_undo_group(&mut self)
fn undo(&mut self) -> bool
fn redo(&mut self) -> bool
fn revert(&mut self) -> bool
fn num_chars(&self) -> usize
fn num_bytes(&self) -> usize
fn width(&self) -> usize
fn char_before(&self, cursor: usize) -> Option<char>
fn char_after(&self, cursor: usize) -> Option<char>
fn remove(&mut self, start: usize, end: usize) -> usize
Returns the number of characters removed.
fn insert(&mut self, start: usize, text: &[char])
fn insert_from_buffer(&mut self, other: &Buffer)
fn range(&self, start: usize, end: usize) -> String
fn range_chars(&self, start: usize, end: usize) -> Vec<char>
fn range_width(&self, start: usize, end: usize) -> usize
fn chars(&self) -> Iter<char>
fn truncate(&mut self, num: usize)
fn print<W>(&self, out: &mut W) -> Result<()> where W: Write
fn print_rest<W>(&self, out: &mut W, after: usize) -> Result<usize> where W: Write
Takes other buffer, measures its length and prints this buffer from the point where the other stopped. Used to implement autosuggestions.
fn starts_with(&self, other: &Buffer) -> bool
Check if the other buffer starts with the same content as this one. Used to implement autosuggestions.
Trait Implementations
impl Debug for Buffer
[src]
impl Clone for Buffer
[src]
fn clone(&self) -> Buffer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl From<String> for Buffer
[src]
impl<'a> From<&'a str> for Buffer
[src]
impl Display for Buffer
[src]
impl FromIterator<char> for Buffer
[src]
fn from_iter<T: IntoIterator<Item=char>>(t: T) -> Self
Creates a value from an iterator. Read more