1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # convers
//! `convers` - is a cool library for converting data from one format to another.
//! The idea is to convert everything from one query, like from one language, unit, etc., to another.
//! There are functions that allow you to do something like that.
//! ## Example of usage `magic_convert` function:
//! ```rust
//! use convers::convert::magic_convert;
//! #[tokio::main]
//! async fn main() {
//! let query = "1m to cm".to_string();
//! let result = magic_convert(&query).await.unwrap(); // Is String - "100 Centimeters"
//! let translate_result = magic_convert(&String::from("en:de how are u?")).await.unwrap(); // Is String - "wie geht es dir?" or something like that
//! let calculated = magic_convert(&String::from("15/3")).await.unwrap(); // Is String - "5" or "5.0"
//! }
//! ```
//! ## What's new in release ?
//! - Translate bug fix ('to' and ':' issue)
//! - Convert currencies(available in magic_convert)
//! ## Also you can use provided things directly:
//! - _Translator_ *struct*
//! - _Measurement_ *struct*
//! - _Evaluate_ *fn*
//! ## Example of usage Measurement:
//! ```rust
//! use convers::utils::units::{Measurement, Unit};
//! let a = Measurement::new(50.0, Unit::Meter);
//! let b = Measurement::new(1.0, Unit::Kilometer);
//! let c = a + b; // anyhow::Result<Measurement>. If unwrap it equals 1.050 Kilometer
//! ```
//! ## Current available conversions:
//! - **Units**: Length, Mass, Amperes, Watts, Size (like kb), Rem/Px/Em,Temperature, Pressure, Speed, Volume, Area
//!- **Translate**
//! - **Translate**
//! - **Currencies**
//! - **Evaluate (with Units too)**
//! ## User Interfaces for **convers**:
//! - [convers_prompt](https://github.com/veaquer/convers_prompt) - An attempt to create something comfy like Raycast. (Soon it will be better)
//! # Soon will be added:
//! - **Conversion of timezones**
//! - **CLI convers binary package to crates.io and AUR**