Trait ByteSlice
pub(crate) trait ByteSlice
Helper methods to process immutable bytes.
Required Methods
fn read_u64(&self) -> u64Reads 8 bytes as a 64-bit integer in little-endian order.
fn write_u64(&mut self, value: u64)Writes a 64-bit integer as 8 bytes in little-endian order.
fn offset_from(&self, other: &Self) -> isizeCalculate the difference in length between two slices.
fn parse_digits(&self, func: impl FnMut(u8)) -> &SelfIteratively parse and consume digits from bytes.
Returns the same bytes with consumed digits being elided. Breaks on invalid digits.
Implementors
impl ByteSlice for [u8]