winnow::stream

Trait FindSlice

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

Look for a slice in self

Required Methods§

Source

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

Returns the offset of the slice if it is found

Implementations on Foreign Types§

Source§

impl<'i> FindSlice<(char, char)> for &'i str

Source§

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

Source§

impl<'i> FindSlice<(char, char)> for &'i [u8]

Source§

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

Source§

impl<'i> FindSlice<(char, char, char)> for &'i str

Source§

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

Source§

impl<'i> FindSlice<(char, char, char)> for &'i [u8]

Source§

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

Source§

impl<'i> FindSlice<(char,)> for &'i str

Source§

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

Source§

impl<'i> FindSlice<(char,)> for &'i [u8]

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn find_slice(&self, substr: (&'s [u8],)) -> Option<Range<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>,