pub struct App {
pub screen: Screen,
pub is_typing: bool,
pub text: String,
pub span_vec: Vec<Span<'static>>,
pub cursor_idx: usize,
pub countdown: usize,
pub key_count: f64,
pub exit: bool,
pub _sender: UnboundedSender<Event>,
}Expand description
Application.
Fields§
§screen: Screen§is_typing: bool§text: String§span_vec: Vec<Span<'static>>§cursor_idx: usize§countdown: usize§key_count: f64§exit: bool§_sender: UnboundedSender<Event>Implementations§
Source§impl App
impl App
Sourcepub fn new(_sender: UnboundedSender<Event>) -> Self
pub fn new(_sender: UnboundedSender<Event>) -> Self
Constructs a new instance of App.
pub fn enter_char(&mut self, ch: char)
Sourcepub fn remove_char(&mut self)
pub fn remove_char(&mut self)
basically handle backspace
pub fn reset(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnwindSafe for App
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