Expand description
Rust port of erengy/anitomy, an anime video filename parser.
The public API (ElementKind, Element, Options, parse) matches
upstream; [detail] holds the implementation, one module per upstream
C++ header. See anitomy/tests/conformance.rs for the harness that
checks output against upstream’s and anitopy’s fixture suites.
Pure, safe Rust: no unsafe, no C dependencies, so it cross-compiles
and builds wheels anywhere rustc runs.
This crate parses untrusted, arbitrary filenames, so it must never panic
on any input; a panic here would be a denial-of-service bug. The lints
below turn the usual panic
sources (.unwrap(), .expect(), panic!, unreachable!, direct
s[i] indexing) into hard errors under cargo clippy (see
tests/no_panic.rs for a runtime check of the same property, which
catches what lints can’t, e.g. integer overflow). Prefer .get(i),
pattern matching, ?, and .unwrap_or(...) instead.
Structs§
- Element
- Options
- Parse
Element Kind Error - No matching
ElementKindfor the given string.
Enums§
Functions§
- parse
- Port of the free function
anitomy::parseininclude/anitomy.hpp.