Type Alias byteorder::NetworkEndian

source ·
pub type NetworkEndian = BigEndian;
Expand description

Defines network byte order serialization.

Network byte order is defined by RFC 1700 to be big-endian, and is referred to in several protocol specifications. This type is an alias of BigEndian.

Note that this type has no value constructor. It is used purely at the type level.

§Examples

Write and read i16 numbers in big endian order:

use byteorder::{ByteOrder, NetworkEndian, BigEndian};

let mut buf = [0; 2];
BigEndian::write_i16(&mut buf, -5_000);
assert_eq!(-5_000, NetworkEndian::read_i16(&buf));

Aliased Type§

enum NetworkEndian {}

Variants§

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 0 bytes (uninhabited)