Recognizes any [`PackageOption`] and [`BuildEnvironmentOption`] in a string slice. Consumes all of its input. # Errors Returns an error if `input` is neither of the listed options.
(input: &mut &str)
| 119 | .into_iter() |
| 120 | .flatten(), |
| 121 | ), |
| 122 | )) |
| 123 | .layer("makepkg option") |
| 124 | .parse_next(input) |
| 125 | } |
| 126 | |
| 127 | fn delimiter_error_context<'a, O, P>( |
| 128 | parser: P, |
| 129 | ) -> impl Parser<Input<'a>, O, ErrMode<ParseStack<'a>>> |
| 130 | where |
| 131 | P: Parser<Input<'a>, O, ErrMode<ParseStack<'a>>>, |
| 132 | { |
| 133 | parser |
| 134 | .expected_text("string consisting of alphanumeric characters or") |
| 135 | .expected_chars(SPECIAL_OPTION_CHARS) |