Struct exile::Document [−][src]
pub struct Document { /* fields omitted */ }
Expand description
Represents an XML Document.
Implementations
impl Document
[src]
impl Document
[src]pub fn from_root(root: Element) -> Self
[src]
pub fn from_root(root: Element) -> Self
[src]Construct a new Document
using the given Element
as the root.
pub fn declaration(&self) -> &Declaration
[src]
pub fn declaration(&self) -> &Declaration
[src]Get the Declaration
object.
pub fn set_declaration(&mut self, declaration: Declaration)
[src]
pub fn set_declaration(&mut self, declaration: Declaration)
[src]Set the Declaration
object for the Document
.
pub fn set_doctype<S: Into<String>>(&mut self, _: S) -> Result<(), XDocErr>
[src]
pub fn set_doctype<S: Into<String>>(&mut self, _: S) -> Result<(), XDocErr>
[src]Disabled doctype setter.
pub fn add_prolog_comment<S: Into<String>>(
&mut self,
comment: S
) -> Result<(), XDocErr>
[src]
pub fn add_prolog_comment<S: Into<String>>(
&mut self,
comment: S
) -> Result<(), XDocErr>
[src]Add a comment before the document root element.
pub fn add_prolog_pi(&mut self, pi: Pi)
[src]
pub fn add_prolog_pi(&mut self, pi: Pi)
[src]Add a processing instruction before the document root element.
pub fn clear_prolog_misc(&mut self)
[src]
pub fn clear_prolog_misc(&mut self)
[src]Remove all [PI
] and comment entries before the root element.
pub fn prolog_misc(&self) -> impl Iterator<Item = &Misc> + '_
[src]
pub fn prolog_misc(&self) -> impl Iterator<Item = &Misc> + '_
[src]Access the Misc
entries before the root element.
pub fn add_epilog_comment<S: Into<String>>(
&mut self,
comment: S
) -> Result<(), XDocErr>
[src]
pub fn add_epilog_comment<S: Into<String>>(
&mut self,
comment: S
) -> Result<(), XDocErr>
[src]Add a comment after the document root element.
pub fn add_epilog_pi(&mut self, pi: Pi)
[src]
pub fn add_epilog_pi(&mut self, pi: Pi)
[src]Add a processing instruction after the document root element.
pub fn clear_epilog_misc(&mut self)
[src]
pub fn clear_epilog_misc(&mut self)
[src]Clear all Misc
entries after the root element.
pub fn epilog_misc(&self) -> Iter<'_, Misc>
[src]
pub fn epilog_misc(&self) -> Iter<'_, Misc>
[src]Access the Misc
entries after the root element.
pub fn write<W>(&self, writer: &mut W) -> Result<()> where
W: Write,
[src]
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<(), XDocErr> where
W: Write,
[src]
pub fn write_opts<W>(
&self,
writer: &mut W,
opts: &WriteOpts
) -> Result<(), XDocErr> 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, XDocErr>
[src]
pub fn to_string_opts(&self, opts: &WriteOpts) -> Result<String, XDocErr>
[src]Write the Document
to a String
using the given options.
Trait Implementations
impl PartialOrd<Document> for Document
[src]
impl PartialOrd<Document> for Document
[src]fn partial_cmp(&self, other: &Document) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Document) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Document
[src]
impl StructuralEq for Document
[src]
impl StructuralPartialEq for Document
[src]
impl Unpin for Document
[src]
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl UnwindSafe for Document
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more