pub(crate) fn read_tag(&mut self, tag: &[u8]) -> Result<(), io::Error> {
        if self.read_exact(tag.len())? == tag {
            Ok(())
        } else {
            Err(io::Error::from(ErrorKind::InvalidData))
        }
    }
/// Read bytes and compare them to the provided tag
Read bytes and compare them to the provided tag
Read bytes and compare them to the provided tag
pub(crate) fn read_tag(&mut self, tag: &[u8]) -> Result<(), io::Error> {
        if self.read_exact(tag.len())? == tag {
            Ok(())
        } else {
            Err(io::Error::from(ErrorKind::InvalidData))
        }
    }
pub ( crate ) fn read_tag ( & mut self , tag : & [ u8 ] ) -> Result < ( ) , io :: Error > { if self . read_exact ( tag . len ( ) ) ? == tag { Ok ( ( ) ) } else { Err ( io :: Error :: from ( ErrorKind :: InvalidData ) ) } }
Read bytes and compare them to the provided tag
Read bytes and compare them to the provided tag
&mut self
tag
&[u8]
&mut self
tag
&[u8]