[−][src]Trait xml_data::parser::InnerState
State to parse multiple elements (on the same level)
Associated Types
Loading content...Required methods
fn parse_inner_finish(self) -> Result<Self::Output>
Finish parsing.
Provided methods
fn parse_inner_node<P: ElementParser>(
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
Try parsing an element with the given tag
Should not fail if it doesn't recognize the tag; instead it needs to return the parser.
fn parse_inner_text<'t>(
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>
Try parsing inner text
Should not fail if it doesn't take text (but may fail if it does but can't parse it).
Implementations on Foreign Types
impl InnerState for String
[src]
Using String
as InnerState
to collect all inner text in it (including whitespace in input)
type Output = Self
fn parse_inner_text<'t>(
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>
[src]
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>
fn parse_inner_finish(self) -> Result<Self::Output>
[src]
impl<'_> InnerState for Cow<'_, str>
[src]
type Output = Self
fn parse_inner_text<'t>(
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>
[src]
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>
fn parse_inner_finish(self) -> Result<Self::Output>
[src]
Implementors
impl<E: ElementState> InnerState for ParseElementList<E>
[src]
type Output = Vec<E::Output>
fn parse_inner_node<P: ElementParser>(
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
[src]
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
fn parse_inner_finish(self) -> Result<Self::Output>
[src]
impl<E: ElementState> InnerState for ParseElementOnce<E>
[src]
type Output = E::Output
fn parse_inner_node<P: ElementParser>(
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
[src]
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
fn parse_inner_finish(self) -> Result<Self::Output>
[src]
impl<E: ElementState> InnerState for ParseElementOptional<E>
[src]
type Output = Option<E::Output>
fn parse_inner_node<P: ElementParser>(
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
[src]
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
fn parse_inner_finish(self) -> Result<Self::Output>
[src]
impl<I: InnerState> InnerState for ParseInnerOptional<I>
[src]
type Output = Option<I::Output>
fn parse_inner_node<P: ElementParser>(
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
[src]
&mut self,
tag: &str,
parser: P
) -> Result<InnerParseResult<P>>
fn parse_inner_text<'t>(
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>
[src]
&mut self,
text: Cow<'t, str>
) -> Result<InnerParseResult<Cow<'t, str>>>