uci_parser/lib.rs
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5 */
6
7#![doc = include_str!("../README.md")]
8
9/// Error handling when parsing/building messages.
10pub mod error;
11
12/// Types representing the various GUI-to-Engine and Engine-to-GUI messages that can be sent.
13pub mod messages;
14
15/// Utilities related to parsing UCI messages.
16mod parser;
17
18/// Well-typed representations of pieces and moves.
19///
20/// Only available by enabling the `types` feature.
21///
22/// Each type in this module implements both [Display] and [FromStr] following the UCI specification,
23/// making it easy to convert to/from them from strings.
24/// All enums are unit-only, making [`as` casts safe](https://doc.rust-lang.org/reference/items/enumerations.html#casting).
25///
26/// [Display]: std::fmt::Display
27/// [FromStr]: std::str::FromStr
28#[cfg(feature = "types")]
29pub mod types;
30
31pub use error::*;
32pub use messages::*;
33use parser::*;
34#[cfg(feature = "types")]
35pub use types::*;