pub(crate) fn write_pattern_id<E: Endian>(
    pid: PatternID,
    dst: &mut [u8],
) -> usizeExpand description
Write the given pattern ID to the beginning of the given slice of bytes
using the specified endianness. The given slice must have length at least
PatternID::SIZE, or else this panics. Upon success, the total number of
bytes written is returned.