pub struct XmlStreamWriter<T> { /* private fields */ }
Expand description
XML stream writer specialized for working with OPC-UA XML.
Implementations§
Source§impl<T> XmlStreamWriter<T>where
T: Write,
impl<T> XmlStreamWriter<T>where
T: Write,
Sourcepub fn new(writer: T) -> XmlStreamWriter<T>
pub fn new(writer: T) -> XmlStreamWriter<T>
Create a new writer with the given inner Write implementation.
Sourcepub fn write_event(&mut self, element: Event<'_>) -> Result<(), XmlWriteError>
pub fn write_event(&mut self, element: Event<'_>) -> Result<(), XmlWriteError>
Write an event to the stream.
Sourcepub fn write_start(&mut self, tag: &str) -> Result<(), XmlWriteError>
pub fn write_start(&mut self, tag: &str) -> Result<(), XmlWriteError>
Write a start tag to the stream.
Sourcepub fn write_end(&mut self, tag: &str) -> Result<(), XmlWriteError>
pub fn write_end(&mut self, tag: &str) -> Result<(), XmlWriteError>
Write an end tag to the stream.
Sourcepub fn write_empty(&mut self, tag: &str) -> Result<(), XmlWriteError>
pub fn write_empty(&mut self, tag: &str) -> Result<(), XmlWriteError>
Write an empty tag to the stream.
Sourcepub fn write_text(&mut self, text: &str) -> Result<(), XmlWriteError>
pub fn write_text(&mut self, text: &str) -> Result<(), XmlWriteError>
Write node contents to the stream.
Sourcepub fn create_element<'a>(&'a mut self, name: &'a str) -> ElementWriter<'a, T>
pub fn create_element<'a>(&'a mut self, name: &'a str) -> ElementWriter<'a, T>
Get a flexible event builder from quick-xml.
Source§impl XmlStreamWriter<&mut dyn Write>
impl XmlStreamWriter<&mut dyn Write>
Trait Implementations§
Source§impl XmlWriteExt for XmlStreamWriter<&mut dyn Write>
impl XmlWriteExt for XmlStreamWriter<&mut dyn Write>
Source§fn encode_child<T: XmlEncodable + ?Sized>(
&mut self,
tag: &str,
value: &T,
context: &Context<'_>,
) -> EncodingResult<()>
fn encode_child<T: XmlEncodable + ?Sized>( &mut self, tag: &str, value: &T, context: &Context<'_>, ) -> EncodingResult<()>
Encode a value as a child element.
Auto Trait Implementations§
impl<T> Freeze for XmlStreamWriter<T>where
T: Freeze,
impl<T> RefUnwindSafe for XmlStreamWriter<T>where
T: RefUnwindSafe,
impl<T> Send for XmlStreamWriter<T>where
T: Send,
impl<T> Sync for XmlStreamWriter<T>where
T: Sync,
impl<T> Unpin for XmlStreamWriter<T>where
T: Unpin,
impl<T> UnwindSafe for XmlStreamWriter<T>where
T: 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