Struct spreadsheet_ods::xmltree::XmlTag [−][src]
pub struct XmlTag { /* fields omitted */ }
Defines a XML tag and it’s children.
Implementations
impl XmlTag
[src]
impl XmlTag
[src]pub fn new<S: Into<String>>(name: S) -> Self
[src]
New Tag.
pub fn set_name<S: Into<String>>(&mut self, name: S)
[src]
Name
pub fn name(&self) -> &str
[src]
Name
pub fn is_empty(&self) -> bool
[src]
Any text or child elements?
pub fn set_attr<'a, S: Into<&'a str>, T: Into<String>>(
&mut self,
name: S,
value: T
)
[src]
&mut self,
name: S,
value: T
)
Sets an attribute
pub fn add_attr_slice(&mut self, attr: &[(&str, String)])
[src]
Adds more attributes.
pub fn add_tag<T: Into<XmlTag>>(&mut self, tag: T)
[src]
Add an element.
pub fn pop_tag(&mut self) -> Option<XmlTag>
[src]
Retrieves the first tag, if any.
pub fn add_text<S: Into<String>>(&mut self, text: S)
[src]
Add text.
pub fn attr<'a, S: Into<&'a str>, T: Into<String>>(
self,
name: S,
value: T
) -> Self
[src]
self,
name: S,
value: T
) -> Self
Sets an attribute. Allows for cascading.
pub fn attr_slice(self, attr: &[(&str, String)]) -> Self
[src]
Adds more attributes.
pub fn tag<T: Into<XmlTag>>(self, tag: T) -> Self
[src]
Adds an element. Allows for cascading.
pub fn text<S: Into<String>>(self, text: S) -> Self
[src]
Adds text. Allows for cascading.
pub fn content(&self) -> &Vec<XmlContent>
[src]
Returns the content vec.
pub fn content_mut(&mut self) -> &mut Vec<XmlContent>
[src]
Returns the content vec.
Trait Implementations
impl AttrMap2Trait for XmlTag
[src]
impl AttrMap2Trait for XmlTag
[src]fn attrmap(&self) -> &AttrMap2
[src]
fn attrmap_mut(&mut self) -> &mut AttrMap2
[src]
fn is_empty(&self) -> bool
[src]
fn add_all(&mut self, data: &[(&str, String)])
[src]
fn set_attr(&mut self, name: &str, value: String)
[src]
fn clear_attr(&mut self, name: &str) -> Option<String>
[src]
fn attr(&self, name: &str) -> Option<&String>
[src]
Auto Trait Implementations
impl RefUnwindSafe for XmlTag
impl RefUnwindSafe for XmlTag
impl UnwindSafe for XmlTag
impl UnwindSafe for XmlTag