pub(crate) trait ByteSlice {
    // Required methods
    fn read_u64(&self) -> u64;
    fn write_u64(&mut self, value: u64);
    fn offset_from(&self, other: &Self) -> isize;
    fn parse_digits(&self, func: impl FnMut(u8)) -> &Self;
}
🔬This is a nightly-only experimental API. (dec2flt)
Expand description

Helper methods to process immutable bytes.

Required Methods§

source

fn read_u64(&self) -> u64

🔬This is a nightly-only experimental API. (dec2flt)

Read 8 bytes as a 64-bit integer in little-endian order.

source

fn write_u64(&mut self, value: u64)

🔬This is a nightly-only experimental API. (dec2flt)

Write a 64-bit integer as 8 bytes in little-endian order.

source

fn offset_from(&self, other: &Self) -> isize

🔬This is a nightly-only experimental API. (dec2flt)

Calculate the offset of a slice from another.

source

fn parse_digits(&self, func: impl FnMut(u8)) -> &Self

🔬This is a nightly-only experimental API. (dec2flt)

Iteratively parse and consume digits from bytes. Returns the same bytes with consumed digits being elided.

Implementors§