pub struct RunConfig<Event, Error>where
Event: 'static,
Error: 'static,{ /* private fields */ }
Expand description
Captures some parameters for crate::run_tui().
Implementations§
Source§impl<Event, Error> RunConfig<Event, Error>
impl<Event, Error> RunConfig<Event, Error>
Sourcepub fn new(term: impl Terminal<Error> + 'static) -> Self
pub fn new(term: impl Terminal<Error> + 'static) -> Self
Terminal is a rat-salsa::terminal::Terminal not a ratatui::Terminal.
Sourcepub fn manual_mode(self) -> Self
pub fn manual_mode(self) -> Self
Don’t run Terminal::init and Terminal::shutdown. You can run your own terminal initialization/shutdown before/after calling run_tui(),
Sourcepub fn poll(self, poll: impl PollEvents<Event, Error> + 'static) -> Self
pub fn poll(self, poll: impl PollEvents<Event, Error> + 'static) -> Self
Add one more poll impl.
Trait Implementations§
Auto Trait Implementations§
impl<Event, Error> Freeze for RunConfig<Event, Error>
impl<Event, Error> !RefUnwindSafe for RunConfig<Event, Error>
impl<Event, Error> !Send for RunConfig<Event, Error>
impl<Event, Error> !Sync for RunConfig<Event, Error>
impl<Event, Error> Unpin for RunConfig<Event, Error>
impl<Event, Error> !UnwindSafe for RunConfig<Event, 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