pub struct RenderData<'b> { /* private fields */ }
Implementations§
Source§impl<'b> RenderData<'b>
impl<'b> RenderData<'b>
pub fn new(buf: &'b Rope, focus: Cursor, anchor: Option<Cursor>) -> Self
pub fn focus(&self) -> Cursor
pub fn line_count(&self) -> usize
pub fn char_count(&self) -> usize
pub fn write_line(&self, line_idx: usize, write: &mut dyn Write) -> Result<()>
pub fn line(&self, index: usize) -> Cow<'_, str>
pub fn last_line(&self) -> Cow<'_, str>
pub fn current_line(&self) -> Cow<'_, str>
Trait Implementations§
Source§impl<'b> Clone for RenderData<'b>
impl<'b> Clone for RenderData<'b>
Source§fn clone(&self) -> RenderData<'b>
fn clone(&self) -> RenderData<'b>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<'b> Copy for RenderData<'b>
Auto Trait Implementations§
impl<'b> Freeze for RenderData<'b>
impl<'b> RefUnwindSafe for RenderData<'b>
impl<'b> Send for RenderData<'b>
impl<'b> Sync for RenderData<'b>
impl<'b> Unpin for RenderData<'b>
impl<'b> UnwindSafe for RenderData<'b>
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