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