Struct pepper::buffer::BufferContent
source · [−]pub struct BufferContent { /* private fields */ }
Implementations
sourceimpl BufferContent
impl BufferContent
pub fn new() -> Self
pub fn lines(&self) -> &[BufferLine]
pub fn line_display_lens(&self) -> &[DisplayLen]
pub fn end(&self) -> BufferPosition
pub fn read<R>(&mut self, read: &mut R) -> Result<()> where
R: BufRead,
pub fn write<W>(&self, write: &mut W) -> Result<()> where
W: Write,
pub fn saturate_position(&self, position: BufferPosition) -> BufferPosition
pub fn text_range(&self, range: BufferRange) -> TextRangeIter<'_>ⓘNotable traits for TextRangeIter<'a>impl<'a> Iterator for TextRangeIter<'a> type Item = &'a str;
pub fn find_search_ranges(
&self,
pattern: &Pattern,
ranges: &mut Vec<BufferRange>
)
pub fn insert_text(
&mut self,
position: BufferPosition,
text: &str
) -> BufferRange
pub fn delete_range(&mut self, range: BufferRange)
pub fn clear(&mut self)
pub fn words_from(
&self,
position: BufferPosition
) -> (WordRefWithPosition<'_>, impl Iterator<Item = WordRefWithPosition<'_>>, impl Iterator<Item = WordRefWithPosition<'_>>)
pub fn word_at(&self, position: BufferPosition) -> WordRefWithPosition<'_>
pub fn position_before(&self, position: BufferPosition) -> BufferPosition
pub fn find_delimiter_pair_at(
&self,
position: BufferPosition,
delimiter: char
) -> Option<BufferRange>
pub fn find_balanced_chars_at(
&self,
position: BufferPosition,
left: char,
right: char
) -> Option<BufferRange>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BufferContent
impl Send for BufferContent
impl Sync for BufferContent
impl Unpin for BufferContent
impl UnwindSafe for BufferContent
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