pub struct Cursor { /* private fields */ }Expand description
A cursor to paint into a buffer.
Implementations§
Source§impl Cursor
impl Cursor
Sourcepub fn ink(self, ink: Ink) -> Self
pub fn ink(self, ink: Ink) -> Self
Sets how the glyph under a Shape::Block cursor is coloured.
Sourcepub fn render(
self,
area: Rect,
buf: &mut Buffer,
pos: Position,
now: Instant,
) -> Report
pub fn render( self, area: Rect, buf: &mut Buffer, pos: Position, now: Instant, ) -> Report
Paints the cursor at pos, clamped into area.
Must run after the text has been rendered into buf: the contrast
pick reads the glyph already in the cell, and a wide glyph’s trailing
cell has to be there to be found.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more