Add 'FromFen' trait

This commit is contained in:
Bruno BELANYI 2022-07-27 23:25:35 +02:00
parent de27c186d3
commit 0fd9766db0
2 changed files with 7 additions and 0 deletions

6
src/fen.rs Normal file
View file

@ -0,0 +1,6 @@
/// A trait to mark items that can be converted from a FEN input.
pub trait FromFen: Sized {
type Err;
fn from_fen(s: &str) -> Result<Self, Self::Err>;
}

View file

@ -1,3 +1,4 @@
pub mod board;
pub mod fen;
pub mod movegen;
pub mod utils;