[][src]Struct xdoc::Document

pub struct Document { /* fields omitted */ }

Represents an XML Document.

Implementations

impl<'a> Document[src]

pub fn new() -> Document[src]

Create a new default document.

impl Document[src]

pub fn from_root(root: Element) -> Self[src]

Construct a new Document using the given Element as the root.

pub fn root(&self) -> &Element[src]

Get the root Element.

pub fn set_root(&mut self, element_data: Element)[src]

Set the root Element.

pub fn declaration(&self) -> &Declaration[src]

Get the Declaration object.

pub fn set_declaration(&mut self, declaration: Declaration)[src]

Set the Declaration object for the Document.

pub fn write<W>(&self, writer: &mut W) -> Result<()> where
    W: Write
[src]

Write the Document to the Write object.

pub fn write_opts<W>(&self, writer: &mut W, opts: &WriteOpts) -> Result<()> where
    W: Write
[src]

Write the Document to the Write object using the given options.

pub fn to_string_opts(&self, opts: &WriteOpts) -> Result<String>[src]

Write the Document to a String using the given options.

Trait Implementations

impl Clone for Document[src]

impl Debug for Document[src]

impl Default for Document[src]

impl Eq for Document[src]

impl Hash for Document[src]

impl PartialEq<Document> for Document[src]

impl PartialOrd<Document> for Document[src]

impl StructuralEq for Document[src]

impl StructuralPartialEq for Document[src]

impl ToString for Document[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.