pub trait FenComponent: Sized {
type Error;
// Required methods
fn try_from_fen_str(s: &str) -> Result<Self, Self::Error>;
fn to_fen_str(&self) -> String;
}Expand description
Allows converting data that can be represented as a FEN sub-string to and from &str.
Required Associated Types§
Required Methods§
fn try_from_fen_str(s: &str) -> Result<Self, Self::Error>
fn to_fen_str(&self) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl FenComponent for Option<Square>
En-Passant FenComponent.
impl FenComponent for Option<Square>
En-Passant FenComponent.
Source§fn try_from_fen_str(s: &str) -> Result<Self, Self::Error>
fn try_from_fen_str(s: &str) -> Result<Self, Self::Error>
En Passant is either - or a square coordinate ex: “a4”.
type Error = ParseFenError
fn to_fen_str(&self) -> String
Implementors§
Source§impl FenComponent for Castling
Castling FenComponent.
impl FenComponent for Castling
Castling FenComponent.
type Error = ParseFenError
Source§impl FenComponent for Color
Side-To-Move FenComponent.
impl FenComponent for Color
Side-To-Move FenComponent.
type Error = ParseFenError
Source§impl FenComponent for Mailbox
Placement FenComponent.
impl FenComponent for Mailbox
Placement FenComponent.
type Error = ParseFenError
Source§impl FenComponent for PieceSets
Placement FenComponent.
impl FenComponent for PieceSets
Placement FenComponent.