input_loop 0.1.3

A utility for getting typed input from stdin with validation
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 8.49 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • SalladShooter/input_loop
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SalladShooter

input_loop

A utility for getting typed input from stdin with validation.

Usage

Run this command in your terminal

cargo add input_loop

Then add this to your Cargo.toml:

[dependencies]
input_loop = version = "0.1.3"

Example

use input_loop::input_loop;

fn main() {
    let number: i32 = input_loop("Enter a number: ");
    println!("You entered: {}", number);
}