Struct IgnoreElement

Source
pub struct IgnoreElement;
Expand description

Can be used as ElementState to ignore an element with all content (attributes and sub elements and text)

Trait Implementations§

Source§

impl ElementState for IgnoreElement

Source§

type Output = ()

Once fully parsed this is the resulting output type.
Source§

fn parse_element_start(_tag: &str) -> Option<Self>

Try creating state to parse an element with the passed tag.
Source§

fn parse_element_attribute( &mut self, _key: &str, _value: Cow<'_, str>, ) -> Result<()>

Parse attribute into state Read more
Source§

fn parse_element_inner_text(&mut self, _text: Cow<'_, str>) -> Result<()>

Parse text or CDATA into state. Read more
Source§

fn parse_element_inner_node<P: ElementParser>( &mut self, _tag: &str, parser: P, ) -> Result<()>

Parse inner elements. Read more
Source§

fn parse_element_finish(self) -> Result<Self::Output>

Finish parsing an element. Read more
Source§

fn parse_error_not_found<T>() -> Result<T>

In case parse_element_start didn’t get to accept any element (either because it always returned None or there just wasn’t enough data), a parser can use this to generate an error. Read more

Auto Trait Implementations§

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.