pub struct InputField { /* private fields */ }Implementations§
Source§impl InputField
impl InputField
pub fn new() -> Self
pub fn with_placeholder(self, placeholder: &str) -> Self
pub fn with_block(self, block: Block<'static>) -> Self
pub fn with_max_length(self, max: usize) -> Self
pub fn with_validator(self, validator: CharValidator) -> Self
pub fn set_processing(&mut self, processing: bool)
pub fn set_focused(&mut self, focused: bool)
pub fn set_error(&mut self, error: Option<String>)
pub fn get_text(&self) -> &str
pub fn clear(&mut self)
pub fn is_empty(&self) -> bool
pub fn validate(&self) -> Result<(), InputError>
pub fn render(&mut self, frame: &mut Frame<'_>, area: Rect)
pub fn handle_key(&mut self, key: KeyCode) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputField
impl RefUnwindSafe for InputField
impl Send for InputField
impl Sync for InputField
impl Unpin for InputField
impl UnsafeUnpin for InputField
impl UnwindSafe for InputField
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> 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 more