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§
sourcefn read_u64(&self) -> u64
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.
sourcefn write_u64(&mut self, value: u64)
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.
sourcefn offset_from(&self, other: &Self) -> isize
fn offset_from(&self, other: &Self) -> isize
🔬This is a nightly-only experimental API. (
dec2flt
)Calculate the offset of a slice from another.
sourcefn parse_digits(&self, func: impl FnMut(u8)) -> &Self
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.