pub fn end(mut self) -> Result<(), Error> {
        // Like other readers, `root` is not obligated to consume the entire element.
        self.return_to_depth(0)?;

        // Find the `EndDocument`.
        loop {
            match self.inner.next().map_err(|e| Error::xml(&[], e))? {
                XmlEvent::EndDocument => return Ok(()),
                XmlEvent::ProcessingInstruction { .. } | XmlEvent::Comment { .. } => {}
                o => {
                    return Err(Error::msg(
                        &[],
                        self.inner.position(),
                        format!("expected EndDocument, got {:#?}", o),
                    ))
                }
            }
        }
    }
/// Ensures the document ends properly after a successful `root`.
Ensures the document ends properly after a successful `root`.
Ensures the document ends properly after a successful ` root ` .
pub fn end(mut self) -> Result<(), Error> {
        // Like other readers, `root` is not obligated to consume the entire element.
        self.return_to_depth(0)?;
        // Find the `EndDocument`.
        loop {
            match self.inner.next().map_err(|e| Error::xml(&[], e))? {
                XmlEvent::EndDocument => return Ok(()),
                XmlEvent::ProcessingInstruction { .. } | XmlEvent::Comment { .. } => {}
                o => {
                    return Err(Error::msg(
                        &[],
                        self.inner.position(),
                        format!("expected EndDocument, got {:#?}", o),
                    ))
                }
            }
        }
    }
pub fn end ( mut self ) -> Result < ( ) , Error > { // Like other readers, `root` is not obligated to consume the entire element. self . return_to_depth ( 0 ) ? ; // Find the `EndDocument`. loop { match self . inner . next ( ) . map_err ( | e | Error :: xml ( & [ ] , e ) ) ? { XmlEvent :: EndDocument => return Ok ( ( ) ) , XmlEvent :: ProcessingInstruction { .. } | XmlEvent :: Comment { .. } => { } o => { return Err ( Error :: msg ( & [ ] , self . inner . position ( ) , format ! ( " " o ) , ) ) } } } }
Ensures the document ends properly after a successful `root`.
Ensures the document ends properly after a successful ` root ` .
mut self