Struct cosmic_text::Cursor
source · pub struct Cursor {
pub line: usize,
pub index: usize,
pub affinity: Affinity,
pub color: Option<Color>,
}
Expand description
Current cursor location
Fields§
§line: usize
Text line the cursor is on
index: usize
First-byte-index of glyph at cursor (will insert behind this glyph)
affinity: Affinity
Whether to associate the cursor with the run before it or the run after it if placed at the boundary between two runs
color: Option<Color>
Cursor color
Implementations§
Trait Implementations§
source§impl Ord for Cursor
impl Ord for Cursor
source§impl PartialEq<Cursor> for Cursor
impl PartialEq<Cursor> for Cursor
source§impl PartialOrd<Cursor> for Cursor
impl PartialOrd<Cursor> for Cursor
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Cursor
impl Eq for Cursor
impl StructuralEq for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin 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