Add 'FromFen' trait

This commit is contained in:
Bruno BELANYI 2022-07-27 23:25:35 +02:00
parent 566dbf2119
commit c5eb965cab
2 changed files with 9 additions and 0 deletions

6
src/board/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>;
}