est/locales/mod.rs
1pub mod nwt_en;
2use thiserror::Error;
3
4#[derive(Debug, Error, PartialEq)]
5pub enum BibleError {
6 #[error("the Bible book, {0}, was not found")]
7 BookNotFound(String),
8 #[error("failed to parse scripture reference: '{0}'")]
9 ParsingError(String),
10}
11
12pub trait BibleRef {
13 fn get_index(book: &str) -> Result<u8, BibleError>;
14 fn is_valid(book: &str) -> bool;
15}