[][src]Function term_basics_linux::flush

pub fn flush() -> Result<()>

Flushes stdout. When you do print! or term-basics-linux equivalent, it will not print immediately. For example if you print! and then input_field(), it will print after you typed in the input. flush() will make sure everything is printed first.

Example

use term_basics_linux as tbl;
print("type: ");
flush().expect("oh no");
let x = input_field();

This example is the same as let x = tbl::prompt("type: ");