pub struct App { /* private fields */ }Expand description
The powerhouse of widgetui, runs all defined widgets for you
Implementations§
source§impl App
impl App
sourcepub fn new(clock: u64) -> Result<Self, Box<dyn Error>>
pub fn new(clock: u64) -> Result<Self, Box<dyn Error>>
Create a new app with the given clock time (in ms)
Examples found in repository?
More examples
sourcepub fn handle_panics(self) -> Self
pub fn handle_panics(self) -> Self
Running this will ensure that any panic that happens, this will catch And prevent your terminal from messing up.
Examples found in repository?
More examples
sourcepub fn widgets<I, T>(self, widget: impl IntoWidgetSet<I, T>) -> Self
pub fn widgets<I, T>(self, widget: impl IntoWidgetSet<I, T>) -> Self
Adds the following Widgets to the system. This will take in a tuple of widgets, or a single widget.
Examples found in repository?
More examples
pub fn widget<W: Widget + 'static>(self, widget: W) -> Self
sourcepub fn states<S: MultiFromStates>(self, state: S) -> Self
pub fn states<S: MultiFromStates>(self, state: S) -> Self
Add the following states to the system This will take in a state or a tuple of states.
sourcepub fn sets(self, set: impl Sets) -> Self
pub fn sets(self, set: impl Sets) -> Self
Add a set to the system
Examples found in repository?
More examples
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