Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ByteArrayIntoBytes

Implementation for converting a ByteArray to a Bytes struct

This conversion creates a new Bytes structure from a ByteArray by iterating through each byte in the ByteArray and appending it to the Bytes structure. The conversion preserves all data and maintains byte order.

Arguments

  • self - The ByteArray to convert to a Bytes struct

Returns

  • Bytes - A new Bytes struct containing all bytes from the input ByteArray

Fully qualified path: alexandria_bytes::bytes::ByteArrayIntoBytes

pub impl ByteArrayIntoBytes of Into<ByteArray, Bytes>;

Impl functions

into

Fully qualified path: alexandria_bytes::bytes::ByteArrayIntoBytes::into

fn into(self: ByteArray) -> Bytes