Trait Offset

pub trait Offset {
    // Required method
    fn offset(&self, second: &Self) -> usize;
}
Expand description

Useful functions to calculate the offset between slices and show a hexdump of a slice

Required Methods§

fn offset(&self, second: &Self) -> usize

Offset between the first byte of self and the first byte of the argument

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl Offset for str

§

fn offset(&self, second: &str) -> usize

§

impl Offset for [u8]

§

fn offset(&self, second: &[u8]) -> usize

§

impl<'a> Offset for &'a str

§

fn offset(&self, second: &&'a str) -> usize

§

impl<'a> Offset for &'a [u8]

§

fn offset(&self, second: &&'a [u8]) -> usize

Implementors§