nom

Trait Offset

Source
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§

Source

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§

Source§

impl Offset for str

Source§

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

Source§

impl Offset for [u8]

Source§

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

Source§

impl<'a> Offset for &'a str

Source§

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

Source§

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

Source§

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

Implementors§