Recognizes any of the [`PackageKeyword`] in an input string slice. Does not consume input and stops after any keyword matches. # Errors Returns an error, if an unknown keyword is encountered.
(input: &mut &str)
| 130 | pub fn parser<'a>(input: &mut Input<'a>) -> PResult<'a, PackageKeyword> { |
| 131 | cut_err(alt(( |
| 132 | RelationKeyword::parser.map(PackageKeyword::Relation), |
| 133 | SharedMetaKeyword::parser.map(PackageKeyword::SharedMeta), |
| 134 | ))) |
| 135 | .expected_strings( |
| 136 | [RelationKeyword::VARIANTS, SharedMetaKeyword::VARIANTS] |
| 137 | .into_iter() |
| 138 | .flatten(), |
| 139 | ) |
| 140 | .layer("package base property keyword") |
| 141 | .parse_next(input) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | /// Ensures that in a combination of [`Keyword`] and [`ClearableValue`], a |
| 146 | /// [`ClearableValue::Single`] is used and returns the value. |
nothing calls this directly
no outgoing calls
no test coverage detected