vin_parser 1.0.0

Vehicle Identification Number (VIN) parser and validator.
Documentation
  • Coverage
  • 100%
    24 out of 24 items documented4 out of 14 items with examples
  • Size
  • Source code size: 37.13 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 541.26 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • maybe-hello-world/vin_parser
    7 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • maybe-hello-world

VIN

Build Status codecov License: MIT docs: latest

Vehicle Identification Number (VIN) parser and validator for Rust.

Provides information about region, manufacturer, country of origin, possible years of assembling and checksum validation of given Vehicle Identification Number.

Examples

Add dependency to your Cargo.toml

[dependencies]
vin = "1.0.0"

Then, in your crate:

extern crate vin;

let vin_number = "WP0ZZZ99ZTS392124";
assert!(vin::check_validity(vin_number).is_ok());
extern crate vin;

// Check VIN with checksum validation
let vin_number = "1M8GDM9AXKP042788";
assert!(vin::verify_checksum(vin).is_ok());
extern crate vin;

// Get VIN information
let vin_number = "wp0zzz998ts392124";
let result = vin::get_info(vin_number).unwrap();
assert_eq!(result.vin, vin_number.to_uppercase());
assert_eq!(result.country, "Germany/West Germany");
assert_eq!(result.manufacturer, "Porsche car");
assert_eq!(result.region, "Europe");
assert!(result.valid_checksum.is_ok());

Thanks

Inspired by this repository: https://github.com/idlesign/vininfo.