pub struct RunConfig<App, Global, Action, Error>where
App: AppWidget<Global, Action, Error>,
Action: 'static + Send + Debug,
Error: 'static + Send + Debug,{
pub n_threats: usize,
pub term: Box<dyn Terminal<App, Global, Action, Error>>,
pub poll: Vec<Box<dyn PollEvents<App, Global, Action, Error>>>,
}Expand description
Captures some parameters for crate::run_tui().
Fields§
§n_threats: usizeHow many worker threads are wanted? Most of the time 1 should be sufficient to offload any gui-blocking tasks.
term: Box<dyn Terminal<App, Global, Action, Error>>This is the renderer that connects to the backend, and calls out for rendering the application.
Defaults to RenderCrossterm.
poll: Vec<Box<dyn PollEvents<App, Global, Action, Error>>>List of all event-handlers for the application.
Defaults to PollTimers, PollCrossterm, PollTasks. Add yours here.
Implementations§
source§impl<App, Global, Action, Error> RunConfig<App, Global, Action, Error>
impl<App, Global, Action, Error> RunConfig<App, Global, Action, Error>
Trait Implementations§
Auto Trait Implementations§
impl<App, Global, Action, Error> Freeze for RunConfig<App, Global, Action, Error>
impl<App, Global, Action, Error> !RefUnwindSafe for RunConfig<App, Global, Action, Error>
impl<App, Global, Action, Error> !Send for RunConfig<App, Global, Action, Error>
impl<App, Global, Action, Error> !Sync for RunConfig<App, Global, Action, Error>
impl<App, Global, Action, Error> Unpin for RunConfig<App, Global, Action, Error>
impl<App, Global, Action, Error> !UnwindSafe for RunConfig<App, Global, Action, Error>
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