#arithmetic #numbers #serial #rfc-1982

sna

Serial Number Arithmetic (RFC 1982) for Rust

1 unstable release

Uses old Rust 2015

0.1.0 Nov 10, 2017

#1985 in Math

MIT license

17KB
226 lines

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);

No runtime deps