winnow::stream

Trait FindSlice

Source
pub trait FindSlice<T> {
    // Required method
    fn find_slice(&self, substr: T) -> Option<usize>;
}
Expand description

Look for a slice in self

Required Methods§

Source

fn find_slice(&self, substr: T) -> Option<usize>

Returns the offset of the slice if it is found

Implementations on Foreign Types§

Source§

impl<'i> FindSlice<char> for &'i str

Source§

fn find_slice(&self, substr: char) -> Option<usize>

Source§

impl<'i> FindSlice<u8> for &'i [u8]

Source§

fn find_slice(&self, substr: u8) -> Option<usize>

Source§

impl<'i, 's> FindSlice<&'s str> for &'i str

Source§

fn find_slice(&self, substr: &'s str) -> Option<usize>

Source§

impl<'i, 's> FindSlice<&'s str> for &'i [u8]

Source§

fn find_slice(&self, substr: &'s str) -> Option<usize>

Source§

impl<'i, 's> FindSlice<&'s [u8]> for &'i [u8]

Source§

fn find_slice(&self, substr: &'s [u8]) -> Option<usize>

Implementors§

Source§

impl<'i, S> FindSlice<S> for &'i BStr
where &'i [u8]: FindSlice<S>,

Source§

impl<'i, S> FindSlice<S> for &'i Bytes
where &'i [u8]: FindSlice<S>,

Source§

impl<I, S, T> FindSlice<T> for Stateful<I, S>
where I: FindSlice<T>,

Source§

impl<I, T> FindSlice<T> for Located<I>
where I: FindSlice<T>,

Source§

impl<I, T> FindSlice<T> for Partial<I>
where I: FindSlice<T>,