Struct liner::Buffer [] [src]

pub struct Buffer {
    // some fields omitted
}

Methods

impl Buffer
[src]

fn new() -> Self

fn clear_actions(&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 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

Trait Implementations

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 Debug for Buffer
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl From<String> for Buffer
[src]

fn from(s: String) -> Self

Performs the conversion.

impl<'a> From<&'a str> for Buffer
[src]

fn from(s: &'a str) -> Self

Performs the conversion.

impl Display for Buffer
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl FromIterator<char> for Buffer
[src]

fn from_iter<T: IntoIterator<Item=char>>(t: T) -> Self

Creates a value from an iterator. Read more