ParsedXml

Struct ParsedXml 

Source
pub struct ParsedXml<'a> {
    pub tokens: Vec<Rc<RefCell<XmlToken<'a>>>>,
    pub errors: Vec<FmtXmlError>,
    /* private fields */
}
Expand description

Struct returned after calling XmlParser::parse().

Fields§

§tokens: Vec<Rc<RefCell<XmlToken<'a>>>>

Vector with the tokens.

§errors: Vec<FmtXmlError>

Vector with error tokens.

Implementations§

Source§

impl<'a> ParsedXml<'a>

Source

pub fn elements_from_name(&self, name: &str) -> Vec<OpenElement<'a>>

Takes a name and returns all open elements matching that name.

Source

pub fn elements(&self) -> Vec<OpenElement<'a>>

Returns vector with all open elements.

Source

pub fn token_from_position( &self, position: FilePosition, ) -> Option<XmlToken<'a>>

Trait Implementations§

Source§

impl<'a> Debug for ParsedXml<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for ParsedXml<'a>

Source§

fn default() -> ParsedXml<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ParsedXml<'a>

§

impl<'a> !RefUnwindSafe for ParsedXml<'a>

§

impl<'a> !Send for ParsedXml<'a>

§

impl<'a> !Sync for ParsedXml<'a>

§

impl<'a> Unpin for ParsedXml<'a>

§

impl<'a> !UnwindSafe for ParsedXml<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.