pub struct InputUI {
pub cursor: u16,
pub input: String,
pub config: InputConfig,
pub prompt: Span<'static>,
}Fields§
§cursor: u16§input: String§config: InputConfig§prompt: Span<'static>Implementations§
Source§impl InputUI
impl InputUI
pub fn new(config: InputConfig) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn cursor_offset(&self, rect: &Rect) -> Position
pub fn set(&mut self, input: String, cursor: u16)
pub fn cancel(&mut self)
pub fn forward_char(&mut self)
pub fn backward_char(&mut self)
pub fn insert_char(&mut self, c: char)
pub fn forward_word(&mut self)
pub fn backward_word(&mut self)
pub fn delete(&mut self)
pub fn delete_word(&mut self)
pub fn delete_line_start(&mut self)
pub fn delete_line_end(&mut self)
pub fn make_input(&self) -> Paragraph<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputUI
impl RefUnwindSafe for InputUI
impl Send for InputUI
impl Sync for InputUI
impl Unpin for InputUI
impl UnwindSafe for InputUI
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeExt for T
impl<T> MaybeExt for T
Source§fn maybe_take(&mut self, maybe: Option<T>)
fn maybe_take(&mut self, maybe: Option<T>)
Merge from maybe by taking.
Source§fn maybe_clone(&mut self, maybe: &Option<T>)where
T: Clone,
fn maybe_clone(&mut self, maybe: &Option<T>)where
T: Clone,
Merge from maybe by cloning.