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 Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin 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