pub trait Offset<Start = Self> {
// Required method
fn offset_from(&self, start: &Start) -> usize;
}Expand description
Useful functions to calculate the offset between slices and show a hexdump of a slice
Required Methods§
Sourcefn offset_from(&self, start: &Start) -> usize
fn offset_from(&self, start: &Start) -> usize
Offset between the first byte of start and the first byte of selfa
Note: This is an offset, not an index, and may point to the end of input
(start.len()) when self is exhausted.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".