toUByteArray

Returns element as a UByteArray, converting scalar types when possible.

Return

element as UByteArray or empty UByteArray if fail.