Skip to main content

XmlTextWriter

Struct XmlTextWriter 

Source
pub struct XmlTextWriter { /* private fields */ }
Expand description

xmlTextWriter writing into an in-memory buffer.

Implementations§

Source§

impl XmlTextWriter

Source

pub fn xml_new_text_writer_memory() -> Self

xmlNewTextWriterMemory.

Source

pub fn set_indent(&mut self, indent: bool)

Source

pub fn start_document( &mut self, version: Option<&str>, encoding: Option<&str>, standalone: Option<&str>, ) -> Result<(), String>

xmlTextWriterStartDocument.

Source

pub fn start_element(&mut self, name: &str) -> Result<(), String>

xmlTextWriterStartElement.

Source

pub fn start_element_ns( &mut self, prefix: Option<&str>, name: &str, ns_uri: Option<&str>, ) -> Result<(), String>

xmlTextWriterStartElementNS.

Source

pub fn write_attribute(&mut self, name: &str, value: &str) -> Result<(), String>

xmlTextWriterWriteAttribute.

Source

pub fn write_attribute_ns( &mut self, prefix: Option<&str>, name: &str, _ns_uri: Option<&str>, value: &str, ) -> Result<(), String>

xmlTextWriterWriteAttributeNS.

Source

pub fn write_string(&mut self, content: &str) -> Result<(), String>

xmlTextWriterWriteString.

Source

pub fn write_comment(&mut self, content: &str) -> Result<(), String>

xmlTextWriterWriteComment.

Source

pub fn write_pi( &mut self, target: &str, data: Option<&str>, ) -> Result<(), String>

xmlTextWriterWritePI.

Source

pub fn write_cdata(&mut self, content: &str) -> Result<(), String>

xmlTextWriterWriteCDATA.

Source

pub fn write_raw(&mut self, content: &str) -> Result<(), String>

xmlTextWriterWriteRaw.

Source

pub fn end_element(&mut self) -> Result<(), String>

xmlTextWriterEndElement.

Source

pub fn end_document(&mut self) -> Result<(), String>

xmlTextWriterEndDocument.

Source

pub fn into_bytes(self) -> Vec<u8>

Source

pub fn as_str(&self) -> &str

Trait Implementations§

Source§

impl Default for XmlTextWriter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.