pub struct Checkbox { /* private fields */ }Expand description
A checkbox field.
Implementations§
Trait Implementations§
Source§impl Field for Checkbox
impl Field for Checkbox
Source§fn render(&self, area: Rect, buf: &mut Buffer, focused: bool, style: &FormStyle)
fn render(&self, area: Rect, buf: &mut Buffer, focused: bool, style: &FormStyle)
Renders the field to the buffer.
Source§fn handle_input(&mut self, event: &KeyEvent) -> bool
fn handle_input(&mut self, event: &KeyEvent) -> bool
Handles keyboard input. Returns true if the input was consumed.
Source§fn validate(&self) -> Result<(), Vec<ValidationError>>
fn validate(&self) -> Result<(), Vec<ValidationError>>
Validates the field and returns any errors.
Source§fn is_required(&self) -> bool
fn is_required(&self) -> bool
Returns whether this field is required.
Auto Trait Implementations§
impl Freeze for Checkbox
impl RefUnwindSafe for Checkbox
impl Send for Checkbox
impl Sync for Checkbox
impl Unpin for Checkbox
impl UnwindSafe for Checkbox
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