Macro serde_scan::scan
source · macro_rules! scan {
($scan_string:tt <- $input:ident) => { ... };
($($t:tt)*) => { ... };
}
Expand description
The scan!
macro.
Useful for extracting important bits from simple ad-hoc text files.
Example
let line = "#1 @ 555,891: 18x12";
let parsed = scan!("#{} @ {},{}: {}x{}" <- line)?;