1pub trait BincodeByteOrder {
2 type Endian: ::byteorder::ByteOrder + 'static;
3}
4
5/// Little-endian byte ordering.
6#[derive(Copy, Clone)]
7pub struct LittleEndian;
8
9/// Big-endian byte ordering.
10#[derive(Copy, Clone)]
11pub struct BigEndian;
12
13/// The native byte ordering of the current system.
14#[derive(Copy, Clone)]
15pub struct NativeEndian;
16
17impl BincodeByteOrder for LittleEndian {
18 type Endian = ::byteorder::LittleEndian;
19}
20
21impl BincodeByteOrder for BigEndian {
22 type Endian = ::byteorder::BigEndian;
23}
24
25impl BincodeByteOrder for NativeEndian {
26 type Endian = ::byteorder::NativeEndian;
27}
28