Module fuel_types::bytes

source ·
Expand description

Word-aligned bytes serialization functions.

Constants

Traits

Functions

  • End of file error representation.
  • Get an array from a fixed sized slice. Won’t compile if the buffer is not large enough.
  • Get a fixed sized mutable slice from a fixed sized slice. Won’t compile if the buffer is not large enough.
  • Get a fixed sized slice from a fixed sized slice. Won’t compile if the buffer is not large enough.
  • Get an array from a specific location in a fixed sized slice. This won’t compile if the buffer is not large enough.
  • Get a fixed sized mutable slice from a specific location in a fixed sized slice. Won’t compile if the buffer is not large enough.
  • Get a fixed sized slice from a specific location in a fixed sized slice. Won’t compile if the buffer is not large enough.
  • Return the word-padded length of the buffer
  • Return the word-padded length of an arbitrary length
  • Restore a statically sized array from a buffer, returning the array and the remainder of the buffer.
  • Read an array of N bytes from buf.
  • Restore an array from a specific location in a buffer. Won’t compile if the buffer is too small.
  • Attempt to restore a variable size bytes from a buffer.
  • Read a number from a buffer.
  • Read a number from a specific location in a buffer. Won’t compile if the buffer is too small.
  • Attempt to restore a variable size bytes with the length specified as argument.
  • Read a word-padded u8 from a buffer.
  • Read a word-padded u8 from a specific location in a buffer. Won’t compile if the buffer is too small.
  • Read the a word-padded u16 from a buffer.
  • Read the a word-padded u16 from a specific location in a buffer. Won’t compile if the buffer is too small.
  • Read the a word-padded u32 from a buffer.
  • Read the a word-padded u32 from a specific location in a buffer. Won’t compile if the buffer is too small.
  • Read the a word-padded usize from a buffer.
  • Read the a word-padded usize from a specific location in a buffer. Won’t compile if the buffer is too small.
  • Read a word from a buffer.
  • Read a word from a specific location in a buffer. Won’t compile if the buffer is too small.
  • Store a statically sized array into a buffer, returning the remainder of the buffer.
  • Store an array at a specific location in a buffer. Won’t compile if the buffer is too small.
  • Attempt to store into the provided buffer the length of bytes as big-endian, and then the bytes itself. The bytes will be padded to be word-aligned.
  • Store a number into this buffer.
  • Store a number at a specific location in this buffer.
  • Attempt to store into the provided buffer the provided bytes. They will be padded to be word-aligned.