pub(crate) fn read_while<F: Fn(&u8) -> bool>(&mut self, f: F) -> Result<&'a [u8], io::Error> {
        match self.remaining.iter().position(|x| !f(x)) {
            None => self.read_exact(self.remaining.len()),
            Some(position) => self.read_exact(position),
        }
    }
/// Read bytes as long as the provided predicate is true
Read bytes as long as the provided predicate is true
Read bytes as long as the provided predicate is true
pub(crate) fn read_while<F: Fn(&u8) -> bool>(&mut self, f: F) -> Result<&'a [u8], io::Error> {
        match self.remaining.iter().position(|x| !f(x)) {
            None => self.read_exact(self.remaining.len()),
            Some(position) => self.read_exact(position),
        }
    }
pub ( crate ) fn read_while < F : Fn ( & u8 ) -> bool > ( & mut self , f : F ) -> Result < & ' a [ u8 ] , io :: Error > { match self . remaining . iter ( ) . position ( | x | ! f ( x ) ) { None => self . read_exact ( self . remaining . len ( ) ) , Some ( position ) => self . read_exact ( position ) , } }
Read bytes as long as the provided predicate is true
Read bytes as long as the provided predicate is true
&mut self
f
F
&mut self
f
F