Skip to main content

TimecatError

Enum TimecatError 

Source
pub enum TimecatError {
Show 41 variants UnknownCommand, NoInput, NotImplemented, EngineNotRunning, BadFen { fen: Cow<'static, str>, }, InvalidDepth { depth: Depth, }, IllegalMove { valid_or_null_move: ValidOrNullMove, board_fen: Cow<'static, str>, }, ColoredOutputUnchanged { b: bool, }, UCIModeUnchanged, ConsoleModeUnchanged, EmptyStack, BestMoveNotFound { fen: Cow<'static, str>, }, NullMoveInCheck { fen: Cow<'static, str>, }, WTimeNotMentioned, BTimeNotMentioned, GameAlreadyOver, UnknownDebugCommand { command: Cow<'static, str>, }, InvalidSpinValue { name: Cow<'static, str>, value: Spin, min: Spin, max: Spin, }, SameSourceAndDestination { move_: Move, }, InvalidPromotion { move_: Move, }, InvalidSanOrLanMove { valid_or_null_move: ValidOrNullMove, fen: Cow<'static, str>, }, InvalidSanMoveString { s: Cow<'static, str>, }, InvalidLanMoveString { s: Cow<'static, str>, }, InvalidMoveString { s: Cow<'static, str>, }, InvalidRankString { s: Cow<'static, str>, }, InvalidFileString { s: Cow<'static, str>, }, InvalidColorString { s: Cow<'static, str>, }, InvalidCastleRightsString { s: Cow<'static, str>, }, InvalidSquareString { s: Cow<'static, str>, }, InvalidPieceTypeString { s: Cow<'static, str>, }, InvalidPieceString { s: Cow<'static, str>, }, InvalidUciMoveString { s: Cow<'static, str>, }, InvalidBoardPosition { position: Box<ChessPosition>, }, InvalidGoCommand { s: Cow<'static, str>, }, IllegalSearchMoves { illegal_moves: Vec<Move>, }, FeatureNotEnabled { s: Cow<'static, str>, }, BadNNUEFile, BadPolyglotFile, PolyglotTableParseError, DecompressionFailed { value: Cow<'static, str>, type_name: Cow<'static, str>, }, CustomError { err_msg: Cow<'static, str>, },
}

Variants§

§

UnknownCommand

§

NoInput

§

NotImplemented

§

EngineNotRunning

§

BadFen

Fields

§fen: Cow<'static, str>
§

InvalidDepth

Fields

§depth: Depth
§

IllegalMove

Fields

§valid_or_null_move: ValidOrNullMove
§board_fen: Cow<'static, str>
§

ColoredOutputUnchanged

Fields

§

UCIModeUnchanged

§

ConsoleModeUnchanged

§

EmptyStack

§

BestMoveNotFound

Fields

§fen: Cow<'static, str>
§

NullMoveInCheck

Fields

§fen: Cow<'static, str>
§

WTimeNotMentioned

§

BTimeNotMentioned

§

GameAlreadyOver

§

UnknownDebugCommand

Fields

§command: Cow<'static, str>
§

InvalidSpinValue

Fields

§name: Cow<'static, str>
§value: Spin
§min: Spin
§max: Spin
§

SameSourceAndDestination

Fields

§move_: Move
§

InvalidPromotion

Fields

§move_: Move
§

InvalidSanOrLanMove

Fields

§valid_or_null_move: ValidOrNullMove
§fen: Cow<'static, str>
§

InvalidSanMoveString

Fields

§s: Cow<'static, str>
§

InvalidLanMoveString

Fields

§s: Cow<'static, str>
§

InvalidMoveString

Fields

§s: Cow<'static, str>
§

InvalidRankString

Fields

§s: Cow<'static, str>
§

InvalidFileString

Fields

§s: Cow<'static, str>
§

InvalidColorString

Fields

§s: Cow<'static, str>
§

InvalidCastleRightsString

Fields

§s: Cow<'static, str>
§

InvalidSquareString

Fields

§s: Cow<'static, str>
§

InvalidPieceTypeString

Fields

§s: Cow<'static, str>
§

InvalidPieceString

Fields

§s: Cow<'static, str>
§

InvalidUciMoveString

Fields

§s: Cow<'static, str>
§

InvalidBoardPosition

Fields

§position: Box<ChessPosition>
§

InvalidGoCommand

Fields

§s: Cow<'static, str>
§

IllegalSearchMoves

Fields

§illegal_moves: Vec<Move>
§

FeatureNotEnabled

Fields

§s: Cow<'static, str>
§

BadNNUEFile

§

BadPolyglotFile

§

PolyglotTableParseError

§

DecompressionFailed

Fields

§value: Cow<'static, str>
§type_name: Cow<'static, str>
§

CustomError

Fields

§err_msg: Cow<'static, str>

Implementations§

Source§

impl TimecatError

Source

pub fn get_custom_error<E: Error>(error: E) -> Self

Source§

impl TimecatError

Source

pub fn stringify_with_optional_raw_input( &self, optional_raw_input: Option<&str>, ) -> String

Trait Implementations§

Source§

impl Clone for TimecatError

Source§

fn clone(&self) -> TimecatError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TimecatError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TimecatError

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for TimecatError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for TimecatError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<&TimecatError> for TimecatError

Source§

fn from(error: &Self) -> Self

Converts to this type from the input type.
Source§

impl From<&'static str> for TimecatError

Source§

fn from(err_msg: &'static str) -> Self

Converts to this type from the input type.
Source§

impl From<Cow<'static, str>> for TimecatError

Source§

fn from(err_msg: Cow<'static, str>) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for TimecatError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ParseBoolError> for TimecatError

Source§

fn from(error: ParseBoolError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIntError> for TimecatError

Source§

fn from(error: ParseIntError) -> Self

Converts to this type from the input type.
Source§

impl From<String> for TimecatError

Source§

fn from(err_msg: String) -> Self

Converts to this type from the input type.
Source§

impl From<TimecatError> for PyErr

Available on crate feature pyo3 only.
Source§

fn from(err: TimecatError) -> Self

Converts to this type from the input type.
Source§

impl From<TimecatError> for String

Source§

fn from(error: TimecatError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromSliceError> for TimecatError

Source§

fn from(error: TryFromSliceError) -> Self

Converts to this type from the input type.
Source§

impl Hash for TimecatError

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TimecatError

Source§

fn eq(&self, other: &TimecatError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TimecatError

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Stringify for TimecatError

Source§

fn stringify<'a>(&self) -> Cow<'a, str>

Source§

impl Eq for TimecatError

Source§

impl StructuralPartialEq for TimecatError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CustomColorize for T
where T: ToString,

Source§

fn colorize( &self, style_functions: &[fn(ColoredString) -> ColoredString], ) -> String

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromQuery for T

Source§

type Target = T

Target type after parsing.
Source§

type Error = HistoryError

Error that can occur while parsing.
Source§

fn from_query( query: &str, ) -> Result<<T as FromQuery>::Target, <T as FromQuery>::Error>

Decode this query string into the target type.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToQuery for T
where T: Serialize,

Source§

type Error = HistoryError

Error that can be returned from the conversion.
Source§

fn to_query(&self) -> Result<Cow<'_, str>, <T as ToQuery>::Error>

Method to encode the query into a string.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Ungil for T
where T: Send,