1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#[derive(Clone, Copy, Debug)] pub enum Endian { Big, Little, Native, } impl Into<String> for &Endian { fn into(self) -> String { String::from( match self { Endian::Big => "Big", Endian::Little => "Little", Endian::Native => "Native", } ) } }