Struct spreadsheet_ods::xmltree::XmlTag[][src]

pub struct XmlTag { /* fields omitted */ }

Defines a XML tag and it’s children.

Implementations

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]

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]

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 Clone for XmlTag[src]

impl Debug for XmlTag[src]

impl Default for XmlTag[src]

impl Display for XmlTag[src]

impl From<&'_ str> for XmlTag[src]

impl From<String> for XmlTag[src]

impl From<XmlTag> for Value[src]

impl Into<XmlTag> for TextH[src]

impl Into<XmlTag> for TextP[src]

impl Into<XmlTag> for Chapter[src]

impl Into<XmlTag> for CharacterCount[src]

impl Into<XmlTag> for CreationDate[src]

impl Into<XmlTag> for CreationTime[src]

impl Into<XmlTag> for Creator[src]

impl Into<XmlTag> for Date[src]

impl Into<XmlTag> for Description[src]

impl Into<XmlTag> for EditingCycles[src]

impl Into<XmlTag> for EditingDuration[src]

impl Into<XmlTag> for FileName[src]

impl Into<XmlTag> for TextSpan[src]

impl Into<XmlTag> for InitialCreator[src]

impl Into<XmlTag> for Keywords[src]

impl Into<XmlTag> for ModificationDate[src]

impl Into<XmlTag> for ModificationTime[src]

impl Into<XmlTag> for PageCount[src]

impl Into<XmlTag> for PageNumber[src]

impl Into<XmlTag> for PrintDate[src]

impl Into<XmlTag> for PrintedBy[src]

impl Into<XmlTag> for PrintTime[src]

impl Into<XmlTag> for SheetName[src]

impl Into<XmlTag> for TextA[src]

impl Into<XmlTag> for Subject[src]

impl Into<XmlTag> for TableCount[src]

impl Into<XmlTag> for Time[src]

impl Into<XmlTag> for Title[src]

impl Into<XmlTag> for TextS[src]

impl Into<XmlTag> for TextTab[src]

impl Into<XmlTag> for TextLineBreak[src]

impl Into<XmlTag> for SoftPageBreak[src]

impl Into<XmlTag> for AuthorInitials[src]

impl Into<XmlTag> for AuthorName[src]

Auto Trait Implementations

impl RefUnwindSafe for XmlTag

impl Send for XmlTag

impl Sync for XmlTag

impl Unpin for XmlTag

impl UnwindSafe for XmlTag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.