Parse a filesystem mode. Should be between 3-5 octal numbers **without** a `0o` prefix.
(input: &mut &'s str)
| 191 | /// |
| 192 | /// Should be between 3-5 octal numbers **without** a `0o` prefix. |
| 193 | fn mode<'s>(input: &mut &'s str) -> ModalResult<&'s str> { |
| 194 | cut_err(take_while(3..5, AsChar::is_oct_digit)) |
| 195 | .context(StrContext::Label("file mode")) |
| 196 | .context(StrContext::Expected(StrContextValue::Description( |
| 197 | "octal string of length 3-5.", |
| 198 | ))) |
| 199 | .parse_next(input) |
| 200 | } |
| 201 | |
| 202 | /// Parse a SHA-256 hash. |
| 203 | fn sha256(input: &mut &str) -> ModalResult<Sha256Checksum> { |
no outgoing calls
no test coverage detected