Struct network_endian::NetworkEndianU16[][src]

#[repr(C, packed)]
pub struct NetworkEndianU16(_);

Modelled as a packed 2-byte array rather than an u16 because (a) it is not native endian and (b) its alignment is not necessary 2 bytes (it's actually 1).

Methods

impl NetworkEndianU16
[src]

Zero: Self = NetworkEndianU16([0, 0])

Zero.

Maximum: Self = NetworkEndianU16([255, 255])

Maximum.

From network endian.

To network endian.

To native endian.

From native endian.

Is not zero.

Trait Implementations

impl Default for NetworkEndianU16
[src]

Returns the "default value" for a type. Read more

impl Debug for NetworkEndianU16
[src]

Formats the value using the given formatter. Read more

impl Copy for NetworkEndianU16
[src]

impl Clone for NetworkEndianU16
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for NetworkEndianU16
[src]

impl PartialEq for NetworkEndianU16
[src]

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

This method tests for !=.

impl Hash for NetworkEndianU16
[src]

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

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

impl PartialOrd for NetworkEndianU16
[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 Ord for NetworkEndianU16
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Into<[u8; 2]> for NetworkEndianU16
[src]

Performs the conversion.

impl From<[u8; 2]> for NetworkEndianU16
[src]

Performs the conversion.

impl NetworkEndian for NetworkEndianU16
[src]

Length: usize = 2

Length in bytes.

Implements [u8; Self::Length] but this can not yet be expressed in Rust.

Convert into bytes.

Underlying bytes.

Writes to a hasher creating a hash.

impl Display for NetworkEndianU16
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations