Trait winnow::stream::Offset

source ·
pub trait Offset {
    // Required method
    fn offset_to(&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_to(&self, second: &Self) -> usize

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

Implementations on Foreign Types§

source§

impl<T> Offset for [T]

Convenience implementation to accept &[T] instead of &&[T] as above

source§

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

source§

impl<'a, T> Offset for &'a [T]

source§

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

source§

impl Offset for str

Convenience implementation to accept &str instead of &&str as above

source§

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

source§

impl<I> Offset for (I, usize)where I: Offset,

source§

fn offset_to(&self, other: &Self) -> usize

source§

impl<'a> Offset for &'a str

source§

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

Implementors§

source§

impl Offset for BStr

source§

impl Offset for Bytes

source§

impl<'a> Offset for &'a BStr

source§

impl<'a> Offset for &'a Bytes

source§

impl<I> Offset for Located<I>where I: Offset,

source§

impl<I> Offset for Partial<I>where I: Offset,

source§

impl<I, S> Offset for Stateful<I, S>where I: Offset,