Struct text_editing::TextLine
source · [−]pub struct TextLine { /* private fields */ }Expand description
The text line represents editable text lines.
Implementations
sourceimpl TextLine
impl TextLine
sourcepub fn cursor_movement(
forward: bool,
skip: bool
) -> fn(_: &TextLine, _: &mut usize)
pub fn cursor_movement(
forward: bool,
skip: bool
) -> fn(_: &TextLine, _: &mut usize)
Returns the appropriate movement function based on parameters forward and skip.
sourcepub fn skip_forward(&self, text_cursor: &mut usize)
pub fn skip_forward(&self, text_cursor: &mut usize)
Moves the text cursor forward until the end of the current word.
sourceimpl TextLine
impl TextLine
sourcepub fn from_string(text: String) -> Self
pub fn from_string(text: String) -> Self
Creates a text line from a String.
sourcepub fn string_index(&self, index: usize) -> usize
pub fn string_index(&self, index: usize) -> usize
Converts the character index to the string index.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TextLine
impl Send for TextLine
impl Sync for TextLine
impl Unpin for TextLine
impl UnwindSafe for TextLine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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