Skip to main content

XIncludeProcessor

Struct XIncludeProcessor 

Source
pub struct XIncludeProcessor<'a, H: SAXHandler = DefaultSAXHandler, R: XIncludeResourceResolver = XIncludeDefaultResourceResolver> {
    pub reader: XMLReader<DefaultParserSpec<'a>, TreeBuildHandler<H>>,
    pub resolver: R,
    /* private fields */
}
Expand description

XInclude processor.

Fields§

§reader: XMLReader<DefaultParserSpec<'a>, TreeBuildHandler<H>>§resolver: R

Implementations§

Source§

impl<H: SAXHandler, R: XIncludeResourceResolver> XIncludeProcessor<'_, H, R>

Source

pub fn new<'a>( reader: XMLReader<DefaultParserSpec<'a>, TreeBuildHandler<H>>, resolver: R, ) -> XIncludeProcessor<'a, H, R>

Build an XInclude processor from a parser that constructs the document tree of XML resources and a resource resolver for XInclude processing.

XInclude processing errors are notified through the reader’s error handler.

Source

pub fn process(&mut self, document: Document) -> Result<Document, XMLError>

Apply XInclude processing to document.

XInclude processing is not performed in-place; therefore, this method always returns a deep copy when processing succeeds.

Source

pub fn process_subtree( &mut self, root: Node<dyn NodeSpec>, ) -> Result<Node<dyn NodeSpec>, XMLError>

Apply XInclude processing to the subtree whose root is root.

XInclude processing is not performed in-place; therefore, this method always returns a deep copy when processing succeeds.

In addition to the usual XInclude processing errors, errors may occur when the root is detached from the Document node, due to the inability to properly obtain the base URI.

Trait Implementations§

Source§

impl Default for XIncludeProcessor<'_>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a, H, R> Freeze for XIncludeProcessor<'a, H, R>
where R: Freeze, H: Freeze,

§

impl<'a, H = DefaultSAXHandler, R = XIncludeDefaultResourceResolver> !RefUnwindSafe for XIncludeProcessor<'a, H, R>

§

impl<'a, H = DefaultSAXHandler, R = XIncludeDefaultResourceResolver> !Send for XIncludeProcessor<'a, H, R>

§

impl<'a, H = DefaultSAXHandler, R = XIncludeDefaultResourceResolver> !Sync for XIncludeProcessor<'a, H, R>

§

impl<'a, H, R> Unpin for XIncludeProcessor<'a, H, R>
where R: Unpin, H: Unpin,

§

impl<'a, H, R> UnsafeUnpin for XIncludeProcessor<'a, H, R>
where R: UnsafeUnpin, H: UnsafeUnpin,

§

impl<'a, H = DefaultSAXHandler, R = XIncludeDefaultResourceResolver> !UnwindSafe for XIncludeProcessor<'a, H, R>

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.