Struct leetcode_tui_rs::app_ui::app::App
source · pub struct App {
pub running: bool,
pub task_request_sender: ChannelRequestSender,
pub pending_notifications: VecDeque<Option<Notification>>,
pub vim_tx: VimPingSender,
pub vim_running: Arc<AtomicBool>,
pub config: Rc<Config>,
/* private fields */
}
Expand description
Application.
Fields§
§running: bool
Is the application running?
task_request_sender: ChannelRequestSender
§pending_notifications: VecDeque<Option<Notification>>
§vim_tx: VimPingSender
§vim_running: Arc<AtomicBool>
§config: Rc<Config>
Implementations§
source§impl App
impl App
sourcepub fn new(
task_request_sender: ChannelRequestSender,
vim_tx: VimPingSender,
vim_running: Arc<AtomicBool>,
config: Rc<Config>
) -> AppResult<Self>
pub fn new( task_request_sender: ChannelRequestSender, vim_tx: VimPingSender, vim_running: Arc<AtomicBool>, config: Rc<Config> ) -> AppResult<Self>
Constructs a new instance of App
.
pub fn total_widgets_count(&self) -> usize
pub fn next_widget(&mut self) -> AppResult<Option<Notification>>
pub fn prev_widget(&mut self) -> AppResult<Option<Notification>>
pub fn setup(&mut self) -> AppResult<()>
pub fn push_notif(&mut self, value: Option<Notification>)
sourcepub fn tick(&mut self, task: Option<TaskResponse>) -> AppResult<()>
pub fn tick(&mut self, task: Option<TaskResponse>) -> AppResult<()>
Handles the tick event of the terminal.
pub fn process_task(&mut self, task: TaskResponse) -> AppResult<()>
pub fn process_pending_notification(&mut self) -> AppResult<()>
pub fn handle_key_events(&mut self, key_event: KeyEvent) -> AppResult<()>
Trait Implementations§
Auto Trait Implementations§
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