pub struct ElementBuilder { /* private fields */ }Expand description
Builder for XML elements.
Implementations§
Source§impl ElementBuilder
impl ElementBuilder
pub fn new(local_name: impl Into<String>) -> XmlResult<Self>
pub fn qualified( prefix: impl Into<String>, local_name: impl Into<String>, namespace_uri: impl Into<String>, ) -> XmlResult<Self>
pub fn namespaced( local_name: impl Into<String>, namespace_uri: impl Into<String>, ) -> XmlResult<Self>
pub fn from_qname(name: QName) -> XmlResult<Self>
pub fn attr( self, name: impl Into<String>, value: impl ToString, ) -> XmlResult<Self>
pub fn qualified_attr( self, prefix: impl Into<String>, local_name: impl Into<String>, namespace_uri: impl Into<String>, value: impl ToString, ) -> XmlResult<Self>
pub fn attr_if( self, name: impl Into<String>, value: Option<impl ToString>, ) -> XmlResult<Self>
pub fn default_namespace(self, uri: impl Into<String>) -> XmlResult<Self>
pub fn namespace( self, prefix: impl Into<String>, uri: impl Into<String>, ) -> XmlResult<Self>
pub fn child(self, child: impl IntoXmlFragment) -> XmlResult<Self>
pub fn children<I, T>(self, children: I) -> XmlResult<Self>where
I: IntoIterator<Item = T>,
T: IntoXmlFragment,
pub fn text(self, value: impl Into<String>) -> XmlResult<Self>
pub fn comment(self, value: impl Into<String>) -> XmlResult<Self>
pub fn cdata(self, value: impl Into<String>) -> XmlResult<Self>
pub fn processing_instruction( self, target: impl Into<String>, data: Option<impl Into<String>>, ) -> XmlResult<Self>
pub fn name(&self) -> &QName
pub fn child_nodes(&self) -> &[XmlNode]
Trait Implementations§
Source§impl Clone for ElementBuilder
impl Clone for ElementBuilder
Source§fn clone(&self) -> ElementBuilder
fn clone(&self) -> ElementBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElementBuilder
impl Debug for ElementBuilder
impl Eq for ElementBuilder
Source§impl IntoXml for ElementBuilder
impl IntoXml for ElementBuilder
fn into_xml(self) -> XmlResult<ElementBuilder>
Source§impl IntoXmlFragment for ElementBuilder
impl IntoXmlFragment for ElementBuilder
fn into_xml_fragment(self) -> XmlResult<FragmentBuilder>
Source§impl PartialEq for ElementBuilder
impl PartialEq for ElementBuilder
Source§fn eq(&self, other: &ElementBuilder) -> bool
fn eq(&self, other: &ElementBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ElementBuilder
Auto Trait Implementations§
impl Freeze for ElementBuilder
impl RefUnwindSafe for ElementBuilder
impl Send for ElementBuilder
impl Sync for ElementBuilder
impl Unpin for ElementBuilder
impl UnsafeUnpin for ElementBuilder
impl UnwindSafe for ElementBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more