[][src]Macro serde_scan::scan

macro_rules! scan {
    ($scan_string:tt <- $input:ident) => { ... };
    ($($t:tt)*) => { ... };
}

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)?;