Skip to main content

XMLStreamReaderBuilder

Struct XMLStreamReaderBuilder 

Source
pub struct XMLStreamReaderBuilder<'a, H: EntityResolver + ErrorHandler = DefaultSAXHandler> { /* private fields */ }
Expand description

Builder for XMLStreamReader.

Implementations§

Source§

impl<'a> XMLStreamReaderBuilder<'a>

Source

pub fn new() -> Self

Constructor.

Source§

impl<'a, H: EntityResolver + ErrorHandler> XMLStreamReaderBuilder<'a, H>

Source

pub fn set_default_base_uri( self, base_uri: impl Into<Arc<URIStr>>, ) -> Result<Self, XMLError>

Set base_uri as the default base URI.

base_uri must be a absolute URI.

Source

pub fn set_handler<Other: EntityResolver + ErrorHandler>( self, handler: Other, ) -> XMLStreamReaderBuilder<'a, Other>

Set error_handler as the error handler.

Source

pub fn set_parser_config(self, config: ParserConfig) -> Self

Set config as the parser config.

Source

pub fn enable_option(self, option: ParserOption) -> Self

Enable a parser option.

Source

pub fn disable_option(self, option: ParserOption) -> Self

Disable a parser option.

Source

pub fn build(self) -> XMLStreamReader<'a, H>

Finish to build the parser.

Trait Implementations§

Source§

impl Default for XMLStreamReaderBuilder<'_>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a, H = DefaultSAXHandler> !RefUnwindSafe for XMLStreamReaderBuilder<'a, H>

§

impl<'a, H = DefaultSAXHandler> !Send for XMLStreamReaderBuilder<'a, H>

§

impl<'a, H = DefaultSAXHandler> !Sync for XMLStreamReaderBuilder<'a, H>

§

impl<'a, H = DefaultSAXHandler> !UnwindSafe for XMLStreamReaderBuilder<'a, H>

§

impl<'a, H> Freeze for XMLStreamReaderBuilder<'a, H>
where Option<H>: Freeze,

§

impl<'a, H> Unpin for XMLStreamReaderBuilder<'a, H>
where Option<H>: Unpin,

§

impl<'a, H> UnsafeUnpin for XMLStreamReaderBuilder<'a, H>
where Option<H>: UnsafeUnpin,

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.