enum Endian <NativeEndian LittleEndian BigEndian>;

An enum for indicating endianness, specifically with methods on blob8 and buf8. Consists of NativeEndian, LittleEndian and BigEndian.


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.


Type relations for Endian
raku-type-graph Endian Endian Int Int Endian->Int Mu Mu Any Any Any->Mu Cool Cool Cool->Any Numeric Numeric Real Real Real->Numeric Int->Cool Int->Real

Expand chart above