ByteArray
type.
Signature
Impl functions
append_word
Appends a single word oflen
bytes to the end of the ByteArray
.
This function assumes that:
word
could be validly converted to abytes31
which has no more thanlen
bytes of data.- len ByteArray
Examples
len
Returns the length of theByteArray
.
Signature
Examples
at
Returns an option of the byte at the given index ofself
or None
if the index is out of bounds.
Signature
Examples
rev
Returns aByteArray
with the reverse order of self
.
Signature
Examples
append_word_rev
Appends the reverse of the given word to the end ofself
.
This function assumes that:
- len < 31
- word is validly convertible to bytes31 of length
len
.