rowdle 0.2.1

A Wordle backend in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fmt::Debug;

use thiserror::Error;

#[derive(Error, Debug, PartialEq)]
pub enum WordleError<T: PartialEq + Debug> {
    #[error("Max tries exceeded")]
    MaxTriesExceeded,
    #[error("The word `{0}` is not present in the word list")]
    InvalidWord(T),
    #[error("The word `{0}` is not the same length as the word to guess")]
    WordLengthMismatch(T),
    #[error("The word `{0}` has already been guessed")]
    WordAlreadyGuessed(T),
    #[error("unknown data store error")]
    Unknown,
}