Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ByteAppenderSupportTrait

Generic support trait for appending signed and unsigned integers onto byte storage. There are two functions, one for each of big and little endian byte order due to performance considerations. The byte reversal could be used in the naïve case when only one implementation is worthwhile.

Fully qualified path: alexandria_data_structures::byte_appender::ByteAppenderSupportTrait

pub trait ByteAppenderSupportTrait<T>

Trait functions

append_bytes_be

Appends bytes data of size count ordered in big endian

Arguments

  • bytes - big endian ordered bytes to append
  • count - number of bytes from input to append

Fully qualified path: alexandria_data_structures::byte_appender::ByteAppenderSupportTrait::append_bytes_be

fn append_bytes_be(ref self: T, bytes: felt252, count: u32)

append_bytes_le

Appends bytes data of size count ordered in little endian

Arguments

  • bytes - little endian ordered bytes to append
  • count - number of bytes from input to append

Fully qualified path: alexandria_data_structures::byte_appender::ByteAppenderSupportTrait::append_bytes_le

fn append_bytes_le(ref self: T, bytes: felt252, count: u32)