/// Parses the input into a `ComponentSelector` ignoring any whitespace around the component
/// selector.
Parses the input into a `ComponentSelector` ignoring any whitespace around the component
selector.
Parses the input into a ` ComponentSelector ` ignoring any whitespace around the component selector .
pub fn consuming_component_selector<'a, E>(
    input: &'a str,
) -> Result<ComponentSelector<'a>, ParseError>
where
    E: ParsingError<'a>,
{
    let result = nom::combinator::all_consuming::<_, _, <E as ParsingError<'_>>::Internal, _>(
        pair(spaced(component_selector), multispace0),
    )(input);
    match result {
        Ok((_, (component_selector, _))) => {
            component_selector.validate()?;
            Ok(component_selector)
        }
        Err(nom::Err::Error(e) | nom::Err::Failure(e)) => Err(E::to_error(input, e)),
        _ => unreachable!("through the complete combinator we get rid of Incomplete"),
    }
}
pub fn consuming_component_selector < ' a , E > ( input : & ' a str , ) -> Result < ComponentSelector < ' a > , ParseError > where E : ParsingError < ' a > , { let result = nom :: combinator :: all_consuming :: < _ , _ , < E as ParsingError < ' _ > > :: Internal , _ > ( pair ( spaced ( component_selector ) , multispace0 ) , ) ( input ) ; match result { Ok ( ( _ , ( component_selector , _ ) ) ) => { component_selector . validate ( ) ? ; Ok ( component_selector ) } Err ( nom :: Err :: Error ( e ) | nom :: Err :: Failure ( e ) ) => Err ( E :: to_error ( input , e ) ) , _ => unreachable ! ( " " ) , } }
Parses the input into a `ComponentSelector` ignoring any whitespace around the component
selector.
Parses the input into a ` ComponentSelector ` ignoring any whitespace around the component selector .
input
&'a str