Crates.io | lib_xch |
lib.rs | lib_xch |
version | 0.13.0 |
source | src |
created_at | 2018-02-08 14:18:06.899125 |
updated_at | 2019-01-31 15:05:27.581056 |
description | Crate xch-ceb's official lib |
homepage | |
repository | https://github.com/XCH-CEB/xch-project |
max_upload_size | |
id | 50175 |
size | 68,848 |
This is crate xch-ceb's official lib.
lib_xch on crates.io
lib_xch's documentation
Swift, Small, Safe.
First of all, you should pick a version.
At this time (2019.1), add following dependency to your Cargo.toml
:
[dependencies]
lib_xch = "^0.12"
For more information, please read the source code of xch-ceb
use lib_xch::public::{handler::Handler, structs::ChemicalEquation};
use std::io;
fn main() {
print_about_info();
let equ = input();
match Handler::<i32>::new(&equ).handle() {
Ok(s) => println!("{:?}", s),
Err(e) => println!("{}", e),
};
}
fn input() -> String {
println!("[INPUT] Input the equation:");
let mut equ = String::new();
io::stdin()
.read_line(&mut equation)
.expect("[ERROR] Failed to read line!");
equ.pop();
equ
}
Licensed under GPL-3.0