pub struct XmlStreamWriter<W: Write> { /* private fields */ }Expand description
Direct XML event writer with bounded output and namespace/state validation.
Implementations§
Source§impl<W: Write> XmlStreamWriter<W>
impl<W: Write> XmlStreamWriter<W>
pub fn new(inner: W) -> Result<Self, Error>
pub fn with_options(inner: W, options: XmlWriteOptions) -> Result<Self, Error>
pub fn start_element<'a, I, A>( &mut self, name: &str, attributes: I, ) -> Result<(), Error>
pub fn empty_element<'a, I, A>( &mut self, name: &str, attributes: I, ) -> Result<(), Error>
pub fn start(&mut self, name: &str) -> Result<(), Error>
pub fn empty(&mut self, name: &str) -> Result<(), Error>
pub fn end_element(&mut self) -> Result<(), Error>
pub fn text(&mut self, value: &str) -> Result<(), Error>
pub fn cdata(&mut self, value: &str) -> Result<(), Error>
pub fn comment(&mut self, value: &str) -> Result<(), Error>
pub fn processing_instruction( &mut self, target: &str, content: Option<&str>, ) -> Result<(), Error>
Sourcepub fn validated_subtree(&mut self, subtree: &ValidatedXml) -> Result<(), Error>
pub fn validated_subtree(&mut self, subtree: &ValidatedXml) -> Result<(), Error>
Embeds one already validated, self-contained XML root below the current element.
pub fn written_bytes(&self) -> usize
pub fn get_ref(&self) -> &W
pub fn finish(self) -> Result<W, Error>
Auto Trait Implementations§
impl<W> Freeze for XmlStreamWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for XmlStreamWriter<W>where
W: RefUnwindSafe,
impl<W> Send for XmlStreamWriter<W>where
W: Send,
impl<W> Sync for XmlStreamWriter<W>where
W: Sync,
impl<W> Unpin for XmlStreamWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for XmlStreamWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for XmlStreamWriter<W>where
W: UnwindSafe,
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