How 2teez/skan works
Skan is a small Rust scanner library. A caller constructs a Scanner from a string or Read source, then consumes bytes, words, lines, or parsed numbers; numeric failures and exhausted input are reported as ScannerError. The graph separates input acquisition, token splitting, typed parsing, and numeric type constraints, while byte iteration remains a Scanner capability. The README documents the main workflow; the source excerpt confirms implementation details and the call from typed parsing to generic number parsing.
Main entry points: scanner.rs Numeric parsing · numbers.rs Numeric type traits
Components 8
Scanner runtime
- Scanner state
src/scanner.rs - Byte iteration
src/scanner.rs - Word and line splitting
src/scanner.rs
Parsing support
- Numeric parsing
src/scanner.rs - Numeric type traits
src/numbers.rs - Scanner errors
src/scanner.rs
Other components
- Library caller
- Read source
Connections 8
- Library caller → Scanner state: creates
README.md - Read source → Scanner state: provides bytes
src/scanner.rs - Library caller → Byte iteration: iterates bytes
README.md - Library caller → Word and line splitting: reads words or lines
README.md - Scanner state → Word and line splitting: splits input
src/scanner.rs - Library caller → Numeric parsing: requests number
README.md - Numeric parsing → Numeric type traits: constrained by
src/scanner.rs - Numeric parsing → Scanner errors: returns errors
src/scanner.rs