[][src]Function casual::confirm

pub fn confirm<S>(text: S) -> bool where
    S: AsRef<str>, 

Prompts the user for confirmation (yes/no).

Examples

if confirm("Are you sure you want to continue?") {
    // continue
} else {
    panic!("Aborted!");
}