Fields
buffer: Vec<char>
buffer_pos: usize
Implementations
sourceimpl Buffer
impl Buffer
pub fn new() -> Self
pub fn insert(&mut self, c: char)
pub fn insert_str(&mut self, s: &str)
pub fn set_buffer_pos(&mut self, pos: usize)
pub fn remove_current_char(&mut self) -> Option<char>
pub fn next_char(&self) -> Option<&char>
pub fn current_char(&self) -> Option<&char>
pub fn previous_char(&self) -> Option<&char>
pub fn move_forward(&mut self)
pub fn move_backward(&mut self)
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_at_string_line_start(&self) -> bool
pub fn is_at_start(&self) -> bool
pub fn is_at_end(&self) -> bool
pub fn goto_start(&mut self)
pub fn goto_end(&mut self)
pub fn _push_str(&mut self, str: &str)
pub fn get(&self, idx: usize) -> Option<&char>
pub fn _last(&self) -> Option<&char>
pub fn iter(&self) -> impl Iterator<Item = &char>
pub fn take(&mut self) -> Vec<char>
Trait Implementations
sourceimpl FromIterator<char> for Buffer
impl FromIterator<char> for Buffer
Auto Trait Implementations
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more