ask_input 0.2.0

Simple input library
Documentation
# ask_input ⌨️


[![Rust Version](https://img.shields.io/badge/rust-1.70+-orange.svg)](https://www.rust-lang.org/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![docs.rs](https://img.shields.io/docsrs/ask_input)](https://docs.rs/ask_input)

A micro-library for keyboard input in Rust. No extra code β€” just input and get values!

## πŸ“ Description

`ask_input` is a tiny wrapper over Rust's standard I/O. One function. All types. Rust figures out the type automatically.

### Features:

- 🎯 One function for everything
- 🧠 Smart type detection
- ⚑ Zero dependencies

## βš™οΈ Installation


Π”ΠΎΠ±Π°Π²ΡŒΡ‚Π΅ Π² ваш `Cargo.toml`:

```toml
[dependencies]
ask_input = "0.2.0"
```

## πŸ§ͺ Examples


Basic usage with proper error handling:

```rust
use ask_input::input;

fn main() {
    let age: i32 = input().expect("Failed to read age");
    let price: f64 = input().expect("Failed to read price");
    let name: String = input().expect("Failed to read name");
    
    println!("Age: {}, Price: {}, Name: {}", age, price, name);
}
```

## πŸ“¦ Functions

- `input::<T>()` β€” Input any type (i32, f64, String, etc.)

## πŸ“‹ Supported Types


| Type | Example | Notes |
|------|---------|-------|
| `i32` | `42` | Leading/trailing whitespace trimmed |
| `f64` | `3.14` | Leading/trailing whitespace trimmed |
| `String` | `Hello` | Whitespace preserved (only newline removed) |
| `bool` | `true` | Case-sensitive, whitespace trimmed |
| `i64`, `u32`... | Any numeric | Whitespace trimmed |

## ⚠️ Breaking Changes (v0.1.0 β†’ v0.2.0)

- `int_input()` β†’ `input::<i32>()`
- `float_input()` β†’ `input::<f64>()`
- `str_input()` β†’ `input::<String>()`
- Now returns `Result` instead of panicking

## πŸ‘€ Author

- **FelineFantasy**
- **License**: MIT