[−][src]Trait cursive::CursiveExt
Extension trait for the Cursive
root to simplify initialization.
It brings backend-specific methods to initialize a Cursive
root.
Examples
use cursive::{Cursive, CursiveExt}; // Use `Cursive::default()` to pick one of the enabled backends, // depending on cargo features. let mut siv = Cursive::default(); // Or explicitly use a specific backend #[cfg(feature = "ncurses-backend")] let mut siv = Cursive::ncurses(); #[cfg(feature = "panncurses-backend")] let mut siv = Cursive::pancurses(); #[cfg(feature = "termion-backend")] let mut siv = Cursive::termion(); #[cfg(feature = "crossterm-backend")] let mut siv = Cursive::crossterm(); #[cfg(feature = "blt-backend")] let mut siv = Cursive::blt();
Associated Types
type Cursive
Type of the returned cursive root.
Required methods
fn default() -> Self::Cursive
Tries to use one of the enabled backends.
Will fallback to the dummy backend if no other backend feature is enabled.
Panics
If the backend initialization fails.
fn ncurses() -> Result<Self::Cursive>
Creates a new Cursive root using a ncurses backend.