#[non_exhaustive]pub enum Command {
SetTitle(String),
SwitchMainScreen,
SwitchAltScreen,
RequestQuit,
}Expand description
Commands are requests sent to the backend
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SetTitle(String)
Set the title to this string
SwitchMainScreen
Switch to the main screen (e.g. the screen the backend isn’t using)
SwitchAltScreen
Switch to the alt screen (e.g. the screen the backend is using)
RequestQuit
Request the backend to quit
Implementations§
Source§impl Command
impl Command
Sourcepub const fn switch_alt_screen() -> Self
pub const fn switch_alt_screen() -> Self
Switch to the main screen (e.g. the screen the backend isn’t using)
Sourcepub const fn switch_main_screen() -> Self
pub const fn switch_main_screen() -> Self
Switch to the alt screen (e.g. the screen the backend is using)
Sourcepub const fn request_quit() -> Self
pub const fn request_quit() -> Self
Request the backend to quit
Trait Implementations§
Source§impl Ord for Command
impl Ord for Command
Source§impl PartialOrd for Command
impl PartialOrd for Command
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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