Converted the endian structures to enumerations.
The BigEndian and LittleEndian structures were turned into enumerations so that they could not be instantiated.
This commit is contained in:
parent
307118412b
commit
d1c4b3e053
@ -7,14 +7,6 @@ use ::converter::Converter;
|
||||
|
||||
|
||||
|
||||
/// Handles serialization where the most
|
||||
/// significant byte is stored at the lowest address.
|
||||
pub struct BigEndian;
|
||||
|
||||
/// Handles serialization where the most
|
||||
/// significant byte is stored at the lowest address.
|
||||
pub struct LittleEndian;
|
||||
|
||||
/// Defines the current platforms endianess.
|
||||
/// This is can only be big endian or little endian.
|
||||
/// This library does not support a mixed endian setting.
|
||||
@ -30,6 +22,18 @@ pub type PlatformEndian = BigEndian;
|
||||
#[cfg(not(target_endian="big"))]
|
||||
pub type PlatformEndian = LittleEndian;
|
||||
|
||||
/// Handles serialization where the most
|
||||
/// significant byte is stored at the lowest address.
|
||||
pub enum BigEndian
|
||||
{
|
||||
}
|
||||
|
||||
/// Handles serialization where the most
|
||||
/// significant byte is stored at the lowest address.
|
||||
pub enum LittleEndian
|
||||
{
|
||||
}
|
||||
|
||||
/// Create an enumeration of the different
|
||||
/// available endianesses.
|
||||
#[derive(Clone, Copy)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user