Skip to main content

Scanner

Struct Scanner 

Source
pub struct Scanner<'a, S: Storage = Native> { /* private fields */ }
Expand description

Pull-based, zero-copy lexical scanner.

Implementations§

Source§

impl<'a> Scanner<'a>

Source

pub fn new(input: &'a str) -> Self

Scan a complete XML document.

Source§

impl<'a, S: Storage> Scanner<'a, S>

Source

pub fn next_event( &mut self, ) -> Result<Option<Event<'a, <S as Storage>::Attributes<'a>>>, Error<<S as Storage>::Label, <S as Storage>::Refusal>>

Return the next event, or None at end of input.

Source

pub const fn input(&self) -> &'a str

Original scanner input.

Auto Trait Implementations§

§

impl<'a, S> Freeze for Scanner<'a, S>
where Option<PendingStart<'a, S>>: Freeze, S: Freeze,

§

impl<'a, S> RefUnwindSafe for Scanner<'a, S>
where Option<PendingStart<'a, S>>: RefUnwindSafe, S: RefUnwindSafe,

§

impl<'a, S> Send for Scanner<'a, S>
where Option<PendingStart<'a, S>>: Send, S: Send,

§

impl<'a, S> Sync for Scanner<'a, S>
where Option<PendingStart<'a, S>>: Sync, S: Sync,

§

impl<'a, S> Unpin for Scanner<'a, S>
where Option<PendingStart<'a, S>>: Unpin, S: Unpin,

§

impl<'a, S> UnsafeUnpin for Scanner<'a, S>
where Option<PendingStart<'a, S>>: UnsafeUnpin, S: UnsafeUnpin,

§

impl<'a, S> UnwindSafe for Scanner<'a, S>
where Option<PendingStart<'a, S>>: UnwindSafe, S: UnwindSafe,

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> Same for T

Source§

type Output = T

Should always be Self
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.