Skip to main content

Dom

Struct Dom 

Source
pub struct Dom { /* private fields */ }
Expand description

A parsed XTCE document: a flat arena of elements plus the interner backing every name.

Implementations§

Source§

impl Dom

Source

pub fn parse(input: &str) -> Result<Self, ParseError>

Parses an XTCE document from a UTF-8 string.

§Errors

Returns ParseError if the input is not well-formed XML or contains no root element.

Source

pub fn root(&self) -> Element<'_>

The document element.

Source

pub fn skipped_sections(&self) -> &[String]

Names of sections dropped during parsing, in document order.

Source

pub fn xmlns(&self) -> Option<&str>

The default XML namespace declared on the root element, if any.

Source

pub fn len(&self) -> usize

Number of elements retained in the arena.

Source

pub fn is_empty(&self) -> bool

Whether the arena holds no elements.

Auto Trait Implementations§

§

impl Forget for Dom

§

impl Freeze for Dom

§

impl Move for Dom

§

impl RefUnwindSafe for Dom

§

impl Send for Dom

§

impl Sync for Dom

§

impl Unpin for Dom

§

impl UnsafeUnpin for Dom

§

impl UnwindSafe for Dom

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.