notcurses/rust/examples/full-basics.rs
joseLuís 31e7305ce8 rust: start improving errors reporting.
- refactor error![] macro, switch place for $msg & $ok parameters.
- add more meaningful NcError return values in several functions related with poc-menu example, for starters.
- the poc-menu example now doesn't randomly fail, IDKW but OK I guess.
- minor unrelated corrections.
2020-12-30 19:11:55 +01:00

18 lines
346 B
Rust

use libnotcurses_sys::*;
fn main() -> NcResult<()> {
let nc = Notcurses::new()?;
let stdplane = nc.stdplane()?;
for ch in "Initializing cells...".chars() {
let cell = NcCell::with_char7b(ch);
stdplane.putc(&cell)?;
sleep![0, 40];
nc.render()?;
}
sleep![0, 900];
nc.stop()?;
Ok(())
}