pub struct Reader<'a> { /* private fields */ }Expand description
The pull tokenizer.
Implementations§
Source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
pub fn new(data: &'a [u8]) -> Self
Sourcepub fn saw_transitional(&self) -> bool
pub fn saw_transitional(&self) -> bool
True once a Transitional namespace URI has been declared.
Sourcepub fn saw_strict(&self) -> bool
pub fn saw_strict(&self) -> bool
True once a Strict namespace URI has been declared.
Sourcepub fn resolve(&self, prefix: &[u8]) -> Ns
pub fn resolve(&self, prefix: &[u8]) -> Ns
Resolves a prefix against the namespaces in scope. xml is always bound.
Sourcepub fn next(&mut self) -> Result<Event<'a>, XmlError>
pub fn next(&mut self) -> Result<Event<'a>, XmlError>
The next token. This is a pull parser, not an iterator: the end of input is an event, and errors end the stream.
Sourcepub fn skip_element(&mut self) -> Result<(), XmlError>
pub fn skip_element(&mut self) -> Result<(), XmlError>
Consumes everything up to and including the end tag matching the most recent start tag, without resolving names or namespaces.
Sourcepub fn text_content(&mut self, out: &mut String) -> Result<(), XmlError>
pub fn text_content(&mut self, out: &mut String) -> Result<(), XmlError>
Reads the text content of the current element up to its end tag,
appending decoded characters to out; nested elements contribute
their text too.
Auto Trait Implementations§
impl<'a> Freeze for Reader<'a>
impl<'a> RefUnwindSafe for Reader<'a>
impl<'a> Send for Reader<'a>
impl<'a> Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> UnsafeUnpin for Reader<'a>
impl<'a> UnwindSafe for Reader<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more