A simple library used to parse Forsyth-Edwards Notation in chess.
use fenrs::Fen;
fn main() {
let notation = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
let fen_obj = Fen::parse(¬ation);
let back_to_notation = fen_obj.to_string();
}
The library only exposes a handful of structs and functions. The usage is documented below
impl Fen {
// ...
fn parse<T: AsRef<str>>(notation: T) -> Result<Fen, FenParsingError>;
}
impl ToString for Fen {
fn to_string(&self) -> String;
}