Struct cosmic_text::TextCursor
source · [−]pub struct TextCursor {
pub line: TextLineIndex,
pub index: usize,
}Expand description
Current cursor location
Fields
line: TextLineIndexText line the cursor is on
index: usizeIndex of glyph at cursor (will insert behind this glyph)
Implementations
sourceimpl TextCursor
impl TextCursor
pub const fn new(line: TextLineIndex, index: usize) -> Self
Trait Implementations
sourceimpl Clone for TextCursor
impl Clone for TextCursor
sourcefn clone(&self) -> TextCursor
fn clone(&self) -> TextCursor
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for TextCursor
impl Debug for TextCursor
sourceimpl Default for TextCursor
impl Default for TextCursor
sourcefn default() -> TextCursor
fn default() -> TextCursor
Returns the “default value” for a type. Read more
sourceimpl PartialEq<TextCursor> for TextCursor
impl PartialEq<TextCursor> for TextCursor
sourcefn eq(&self, other: &TextCursor) -> bool
fn eq(&self, other: &TextCursor) -> bool
impl Copy for TextCursor
impl Eq for TextCursor
impl StructuralEq for TextCursor
impl StructuralPartialEq for TextCursor
Auto Trait Implementations
impl RefUnwindSafe for TextCursor
impl Send for TextCursor
impl Sync for TextCursor
impl Unpin for TextCursor
impl UnwindSafe for TextCursor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more