[−][src]Struct xdoc::Document
Represents an XML Document.
Implementations
impl<'a> Document
[src]
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]
W: Write,
Write the Document
to the Write
object.
pub fn write_opts<W>(&self, writer: &mut W, opts: &WriteOpts) -> Result<()> where
W: Write,
[src]
W: Write,
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Document> for Document
[src]
impl PartialOrd<Document> for Document
[src]
fn partial_cmp(&self, other: &Document) -> Option<Ordering>
[src]
fn lt(&self, other: &Document) -> bool
[src]
fn le(&self, other: &Document) -> bool
[src]
fn gt(&self, other: &Document) -> bool
[src]
fn ge(&self, other: &Document) -> bool
[src]
impl StructuralEq for Document
[src]
impl StructuralPartialEq for Document
[src]
impl ToString for Document
[src]
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,