casual 0.1.0

Simple crate for parsing user input.
Documentation

casual

Simple crate for parsing user input.

Usage

use casual::{confirm, prompt};

// Rust type inference is used to know what to return.
let username: String = prompt("Please enter your name: ").get();

// `FromStr` is used to parse the input, so you can read any type that
// implements `FromStr`.
let age: u32 = prompt("Please enter your age: ").get();

// A convenience function `confirm` is provided for getting a yes or no answer.
if !confirm("Are you sure you want to continue?") {
    panic!("Aborted!");
}

License

Licensed under either of

at your option.