Add 'FromFen' trait

This commit is contained in:
Bruno BELANYI 2022-07-27 23:25:35 +02:00
parent a26c532015
commit 43fb428749
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>;
}