pub struct TextField {
pub content: String,
pub scroll: usize,
pub cursor: usize,
pub style: Style,
pub text_style: Style,
pub cursor_style: Style,
pub width: Option<u16>,
}Fields§
§content: String§scroll: usize§cursor: usize§style: Style§text_style: Style§cursor_style: Style§width: Option<u16>Implementations§
Source§impl TextField
impl TextField
pub fn insert(&mut self, index: usize, c: char) -> Result<(), TextFieldError>
pub fn remove(&mut self, index: usize) -> Result<(), TextFieldError>
pub fn push(&mut self, c: char) -> Result<(), TextFieldError>
pub fn pop(&mut self) -> Result<(), TextFieldError>
pub fn left(&mut self) -> Result<(), TextFieldError>
pub fn right(&mut self) -> Result<(), TextFieldError>
pub fn first(&mut self) -> Result<(), TextFieldError>
pub fn last(&mut self) -> Result<(), TextFieldError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextField
impl RefUnwindSafe for TextField
impl Send for TextField
impl Sync for TextField
impl Unpin for TextField
impl UnwindSafe for TextField
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 more