enum Endian
enum Endian <NativeEndian LittleEndian BigEndian>;
An enum for indicating endianness, specifically with methods on blob8
and
buf8
. Consists of NativeEndian
, LittleEndian
and BigEndian
.
Methods
routine Numeric
multi method Numeric(Endian:D --> Int:D)
Returns the value part of the enum
pair.
say NativeEndian.Numeric; # OUTPUT: «0»
say LittleEndian.Numeric; # OUTPUT: «1»
say BigEndian.Numeric; # OUTPUT: «2»
Note that the actual numeric values are subject to change. So please use the named values instead.