pub struct State<P: Paragraph> { /* private fields */ }Expand description
The state of a TextInput.
Implementations§
Source§impl<P: Paragraph> State<P>
impl<P: Paragraph> State<P>
Sourcepub fn is_focused(&self) -> bool
pub fn is_focused(&self) -> bool
Returns whether the TextInput is currently focused or not.
Sourcepub fn move_cursor_to_front(&mut self)
pub fn move_cursor_to_front(&mut self)
Sourcepub fn move_cursor_to_end(&mut self)
pub fn move_cursor_to_end(&mut self)
Sourcepub fn move_cursor_to(&mut self, position: usize)
pub fn move_cursor_to(&mut self, position: usize)
Sourcepub fn select_all(&mut self)
pub fn select_all(&mut self)
Selects all the content of the TextInput.
Sourcepub fn select_range(&mut self, start: usize, end: usize)
pub fn select_range(&mut self, start: usize, end: usize)
Selects the given range of the content of the TextInput.
Trait Implementations§
Source§impl<P: Paragraph> TextInput for State<P>
impl<P: Paragraph> TextInput for State<P>
Source§fn move_cursor_to_front(&mut self)
fn move_cursor_to_front(&mut self)
Moves the cursor of the text input to the front of the input text.
Source§fn move_cursor_to_end(&mut self)
fn move_cursor_to_end(&mut self)
Moves the cursor of the text input to the end of the input text.
Source§fn move_cursor_to(&mut self, position: usize)
fn move_cursor_to(&mut self, position: usize)
Moves the cursor of the text input to an arbitrary location.
Source§fn select_all(&mut self)
fn select_all(&mut self)
Selects all the content of the text input.
Source§fn select_range(&mut self, start: usize, end: usize)
fn select_range(&mut self, start: usize, end: usize)
Selects the given content range of the text input.
Auto Trait Implementations§
impl<P> Freeze for State<P>where
P: Freeze,
impl<P> RefUnwindSafe for State<P>where
P: RefUnwindSafe,
impl<P> Send for State<P>where
P: Send,
impl<P> Sync for State<P>where
P: Sync,
impl<P> Unpin for State<P>where
P: Unpin,
impl<P> UnsafeUnpin for State<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for State<P>where
P: UnwindSafe,
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
impl<T> MaybeClone for T
impl<T> MaybeDebug for T
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
§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.