dustins / sna

Serial Number Arithmetic (RFC 1982) for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sna

An implementation of Serial Number Arithmetic as defined by RFC 1982 for Rust.

Version Travis AppVeyor Codecov

Usage

Add this to your Cargo.toml:

[dependencies]
sna = "0.1"

Add this to your crate:

extern crate sna;

Examples

use sna::SerialNumber;

let zero = SerialNumber(0u8);
let one = SerialNumber(1u8);

assert_eq!(0u8, one + 255u8);
assert!(zero > 255u8);

Linting

To run clippy lints, compile the library with --features clippy on a nightly compiler:

$ cargo build --features clippy

If nightly is not your default compiler:

$ rustup run nightly cargo build --features clippy

About

Serial Number Arithmetic (RFC 1982) for Rust

License:MIT License


Languages

Language:Rust 100.0%