pub struct Input {
pub cursor_index: usize,
/* private fields */
}Expand description
Holds the chars typed by the user and the cursor position. Methods allow mutation of this content and movement of the cursor.
Fields§
§cursor_index: usizeThe index of the cursor in that string
Implementations§
source§impl Input
impl Input
sourcepub fn cursor_start(&mut self)
pub fn cursor_start(&mut self)
Move the cursor to the start
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn cursor_end(&mut self)
pub fn cursor_end(&mut self)
Move the cursor to the end
sourcepub fn cursor_left(&mut self)
pub fn cursor_left(&mut self)
Move the cursor left if possible
sourcepub fn cursor_right(&mut self)
pub fn cursor_right(&mut self)
Move the cursor right if possible
sourcepub fn delete_char_left(&mut self)
pub fn delete_char_left(&mut self)
Backspace, delete the char under the cursor and move left
sourcepub fn delete_chars_right(&mut self)
pub fn delete_chars_right(&mut self)
Delete all chars right to the cursor
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().