mynumber

Crates.iomynumber
lib.rsmynumber
version0.2.0
sourcesrc
created_at2015-11-19 13:18:16.533157
updated_at2015-12-12 23:55:19.918092
descriptionMy Number validator
homepagehttps://github.com/Tomohiro/mynumber
repositoryhttps://github.com/Tomohiro/mynumber
max_upload_size
id3455
size3,164
Tomohiro Taira (tomohiro)

documentation

README

mynumber

Crate Version Build Status Build Status Coverage Status MIT License

My Number validator for Rust

Installation

Put this in your Cargo.toml:

[dependencies]
mynumber = "0.1"

Usage

Put this in your crate root:

extern crate mynumber;

fn main() {
    match mynumber::verify("123456789018") {
      Ok(()) => println!("valid"),
      Err(e) => println!("invalid: {:?}", e),
    }
}

Verifying an Individual Number a.k.a My Number

extern crate mynumber;

use mynumber::individual;

fn main() {
    match individual::verify("123456789018") {
      Ok(()) => println!("valid"),
      Err(e) => println!("invalid: {:?}", e),
    }
}

Verifying a Corporate Number

extern crate mynumber;

use mynumber::corporate;

fn main() {
    match corporate::verify("9234567890123") {
      Ok(()) => println!("valid"),
      Err(e) => println!("invalid: {:?}", e),
    }
}

Contributing

Please check out the CONTIRBUTING guideline.

Acknowledgements

LICENSE

© 2015 Tomohiro TAIRA.

This project is licensed under the MIT license. See LICENSE for details.

Commit count: 39

cargo fmt