pub enum Reference {
BookChapter(BookId, u8),
BookChapterNumber(BookId, u8, u8),
BookChapterNumberFromTo(BookId, u8, u8, u8),
}Expand description
Represents a reference to a Bible passage via chapter and or more verses.
Variants§
BookChapter(BookId, u8)
BookChapterNumber(BookId, u8, u8)
BookChapterNumberFromTo(BookId, u8, u8, u8)
Implementations§
source§impl Reference
impl Reference
sourcepub fn get_book_abbreviation(&self, text: &TextId) -> &'static str
pub fn get_book_abbreviation(&self, text: &TextId) -> &'static str
TODO: Optimize by avoiding match statement and just get data somewhere directly.
sourcepub fn get_chapter(&self) -> u8
pub fn get_chapter(&self) -> u8
TODO: Optimize by avoiding match statement and just get data somewhere directly.
sourcepub fn get_number(&self) -> Option<u8>
pub fn get_number(&self) -> Option<u8>
TODO: Optimize by avoiding match statement and just get data somewhere directly.
pub fn to_string(&self, text: &TextId) -> String
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnwindSafe for Reference
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more