read_u64
Reads a u64 from bytes at offset, in the given byte order.
Import
Section titled “Import”Cargo feature bytes (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
bytes | &[u8] | The buffer to read from. |
offset | usize | The index of the first byte to read. |
endian | Endian | The byte order of the value in the buffer. |
Returns
Section titled “Returns”Option<u64> — The value, or None when fewer than 8 bytes remain at offset.
