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: Terminal<CrosstermBackend<Stdout>>) -> Self
pub fn new(term: Terminal<CrosstermBackend<Stdout>>) -> Self
New with terminal.
Sourcepub fn inline(lines: u16, clear_on_shutdown: bool) -> Result<Self, Error>
pub fn inline(lines: u16, clear_on_shutdown: bool) -> Result<Self, Error>
Initialize as an inline terminal
Sourcepub fn fixed(area: Rect, clear_on_shutdown: bool) -> Result<Self, Error>
pub fn fixed(area: Rect, clear_on_shutdown: bool) -> Result<Self, Error>
Initialize for a fixed portion of the actual terminal.
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