Struct treexml::ElementBuilder [−][src]
pub struct ElementBuilder { /* fields omitted */ }
A builder for Element
Methods
impl ElementBuilder
[src]
impl ElementBuilder
pub fn new<S>(name: S) -> ElementBuilder where
S: ToString,
[src]
pub fn new<S>(name: S) -> ElementBuilder where
S: ToString,
Create a builder for an Element
with the tag name name
pub fn prefix<S>(&mut self, prefix: S) -> &mut ElementBuilder where
S: ToString,
[src]
pub fn prefix<S>(&mut self, prefix: S) -> &mut ElementBuilder where
S: ToString,
Set the element's prefix to prefix
pub fn attr<K, V>(&mut self, key: K, value: V) -> &mut ElementBuilder where
K: ToString,
V: ToString,
[src]
pub fn attr<K, V>(&mut self, key: K, value: V) -> &mut ElementBuilder where
K: ToString,
V: ToString,
Set the element's attribute key
to value
pub fn text<S>(&mut self, text: S) -> &mut ElementBuilder where
S: ToString,
[src]
pub fn text<S>(&mut self, text: S) -> &mut ElementBuilder where
S: ToString,
Set the element's text to text
pub fn cdata<S>(&mut self, cdata: S) -> &mut ElementBuilder where
S: ToString,
[src]
pub fn cdata<S>(&mut self, cdata: S) -> &mut ElementBuilder where
S: ToString,
Set the element's CDATA to cdata
pub fn children(
&mut self,
children: Vec<&mut ElementBuilder>
) -> &mut ElementBuilder
[src]
pub fn children(
&mut self,
children: Vec<&mut ElementBuilder>
) -> &mut ElementBuilder
Append children to this Element
pub fn element(&self) -> Element
[src]
pub fn element(&self) -> Element
Creates an Element
from the builder
Trait Implementations
impl Debug for ElementBuilder
[src]
impl Debug for ElementBuilder
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for ElementBuilder
[src]
impl Clone for ElementBuilder
fn clone(&self) -> ElementBuilder
[src]
fn clone(&self) -> ElementBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for ElementBuilder
[src]
impl PartialEq for ElementBuilder
fn eq(&self, other: &ElementBuilder) -> bool
[src]
fn eq(&self, other: &ElementBuilder) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ElementBuilder) -> bool
[src]
fn ne(&self, other: &ElementBuilder) -> bool
This method tests for !=
.
impl Eq for ElementBuilder
[src]
impl Eq for ElementBuilder
impl From<ElementBuilder> for Element
[src]
impl From<ElementBuilder> for Element
fn from(value: ElementBuilder) -> Element
[src]
fn from(value: ElementBuilder) -> Element
Performs the conversion.
impl From<Element> for ElementBuilder
[src]
impl From<Element> for ElementBuilder
fn from(element: Element) -> ElementBuilder
[src]
fn from(element: Element) -> ElementBuilder
Performs the conversion.
Auto Trait Implementations
impl Send for ElementBuilder
impl Send for ElementBuilder
impl Sync for ElementBuilder
impl Sync for ElementBuilder