pub struct Runtime<A: App> { /* private fields */ }Expand description
Configures and runs an application in the terminal.
Implementations§
Source§impl<A: App> Runtime<A>
impl<A: App> Runtime<A>
Sourcepub fn locale_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn locale_dir(self, dir: impl Into<PathBuf>) -> Self
Loads locale files from dir.
Sourcepub fn keymap_file(self, file: impl Into<PathBuf>) -> Self
pub fn keymap_file(self, file: impl Into<PathBuf>) -> Self
Layers keymap file over the built-in keymap.
Sourcepub fn settings(self, settings: &Settings) -> Self
pub fn settings(self, settings: &Settings) -> Self
Starts with the theme, language, icon mode and reduced motion saved in settings, so
the first frame already looks the way the user left it. Saved values win over
Runtime::theme.
Auto Trait Implementations§
impl<A> !RefUnwindSafe for Runtime<A>
impl<A> !UnwindSafe for Runtime<A>
impl<A> Freeze for Runtime<A>where
A: Freeze,
impl<A> Send for Runtime<A>where
A: Send,
impl<A> Sync for Runtime<A>where
A: Sync,
impl<A> Unpin for Runtime<A>where
A: Unpin,
impl<A> UnsafeUnpin for Runtime<A>where
A: UnsafeUnpin,
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