pub fn expect_start<'a, 'b, 'c, B: BufRead>(
    key: &'a str,
    reader: &'b mut XmlReader<B>,
    buf: &'c mut Vec<u8>,
) -> Result<XmlBytesStart<'c>> {
    if let Ok(XmlEvent::Start(e)) = reader.read_event(buf) {
        check_start(e, key, reader)
    } else {
        Err(Error::MissingTag(key.to_owned()))
    }
}
/// Expect an opening tag and return it
Expect an opening tag and return it
Expect an opening tag and return it
pub fn expect_start<'a, 'b, 'c, B: BufRead>(
    key: &'a str,
    reader: &'b mut XmlReader<B>,
    buf: &'c mut Vec<u8>,
) -> Result<XmlBytesStart<'c>> {
    if let Ok(XmlEvent::Start(e)) = reader.read_event(buf) {
        check_start(e, key, reader)
    } else {
        Err(Error::MissingTag(key.to_owned()))
    }
}
pub fn expect_start < ' a , ' b , ' c , B : BufRead > ( key : & ' a str , reader : & ' b mut XmlReader < B > , buf : & ' c mut Vec < u8 > , ) -> Result < XmlBytesStart < ' c > > { if let Ok ( XmlEvent :: Start ( e ) ) = reader . read_event ( buf ) { check_start ( e , key , reader ) } else { Err ( Error :: MissingTag ( key . to_owned ( ) ) ) } }
Expect an opening tag and return it
Expect an opening tag and return it
key
&'a str
reader
&'b mut XmlReader<B>
buf
&'c mut Vec<u8>
key
&'a str
reader
&'b mut XmlReader<B>
buf
&'c mut Vec<u8>