MCPcopy Create free account
hub / github.com/archlinux/alpm / parser

Method parser

alpm-types/src/version/base.rs:68–77  ·  view source on GitHub ↗

Recognizes an [`Epoch`] in a string slice. Consumes all of its input. # Errors Returns an error if `input` is not a valid _alpm_epoch_.

(input: &mut &str)

Source from the content-addressed store, hash-verified

66 }
67}
68
69impl AlpmParser for Epoch {
70 /// Recognizes an [`Epoch`] in a string slice.
71 ///
72 /// # Errors
73 ///
74 /// Returns an error if `input` does not begin with a valid _alpm_epoch_.
75 fn parser<'a>(input: &mut Input<'a>) -> PResult<'a, Self> {
76 dec_uint
77 .expected_text("non-negative decimal integer")
78 .map(Self)
79 .layer("alpm-epoch")
80 .parse_next(input)

Callers

nothing calls this directly

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected