Struct sparkle::SerialNumber [] [src]

pub struct SerialNumber(pub u32);

Encapsulates a zone's serial number.

SerialNumber uses sequence space arithmetic, defined in RFC 1982. Sequence space arithmetic defines the addition and comparison operations such that the serial number wraps on overflow while maintaining an intuitive and well defined meaning for the operations' results.

Examples

use sparkle::SerialNumber;

let x = SerialNumber(0);
assert!(x < x + SerialNumber(1));

let x = SerialNumber(0x_ffff_ffff);
assert!(x < x + SerialNumber(1));

Methods

impl SerialNumber
[src]

Trait Implementations

impl Clone for SerialNumber
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for SerialNumber
[src]

impl Debug for SerialNumber
[src]

Formats the value using the given formatter.

impl Eq for SerialNumber
[src]

impl Hash for SerialNumber
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for SerialNumber
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Display for SerialNumber
[src]

Formats the value using the given formatter. Read more

impl PartialOrd for SerialNumber
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Add for SerialNumber
[src]

The resulting type after applying the + operator

The method for the + operator

impl AddAssign for SerialNumber
[src]

The method for the += operator