Struct Serializer

Source
pub struct Serializer<'xml, W: Write + ?Sized> { /* private fields */ }

Implementations§

Source§

impl<'xml, W: Write + ?Sized> Serializer<'xml, W>

Source

pub fn new(output: &'xml mut W) -> Self

Source

pub fn write_start( &mut self, name: &str, ns: &str, ) -> Result<Option<&'static str>, Error>

Source

pub fn write_attr<V: ToXml + ?Sized>( &mut self, name: &str, ns: &str, value: &V, ) -> Result<(), Error>

Source

pub fn write_str<V: Display + ?Sized>(&mut self, value: &V) -> Result<(), Error>

Source

pub fn end_start(&mut self) -> Result<(), Error>

Source

pub fn end_empty(&mut self) -> Result<(), Error>

Source

pub fn write_close( &mut self, prefix: Option<&str>, name: &str, ) -> Result<(), Error>

Source

pub fn push<const N: usize>( &mut self, new: Context<N>, ) -> Result<Context<N>, Error>

Source

pub fn pop<const N: usize>(&mut self, old: Context<N>)

Source

pub fn prefix(&self, ns: &str) -> Option<&'static str>

Source

pub fn default_ns(&self) -> &'static str

Auto Trait Implementations§

§

impl<'xml, W> Freeze for Serializer<'xml, W>
where W: ?Sized,

§

impl<'xml, W> RefUnwindSafe for Serializer<'xml, W>
where W: RefUnwindSafe + ?Sized,

§

impl<'xml, W> Send for Serializer<'xml, W>
where W: Send + ?Sized,

§

impl<'xml, W> Sync for Serializer<'xml, W>
where W: Sync + ?Sized,

§

impl<'xml, W> Unpin for Serializer<'xml, W>
where W: ?Sized,

§

impl<'xml, W> !UnwindSafe for Serializer<'xml, W>

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 = Infallible

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.