pub struct Chapter { /* private fields */ }Expand description
Represents a chapter from a Bible book.
A chapter contains multiple verses and has a chapter number.
Implementations§
Source§impl Chapter
impl Chapter
Sourcepub fn new(verses: Vec<Verse>, chapter_number: usize) -> Self
pub fn new(verses: Vec<Verse>, chapter_number: usize) -> Self
Creates a new chapter with the given verses and chapter number.
§Arguments
verses- A vector of verses in this chapterchapter_number- The chapter number within the book
Sourcepub fn get_verses(&self) -> &[Verse]
pub fn get_verses(&self) -> &[Verse]
Returns a slice of all verses in this chapter.
§Returns
A slice containing the verses in this chapter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chapter
impl RefUnwindSafe for Chapter
impl Send for Chapter
impl Sync for Chapter
impl Unpin for Chapter
impl UnsafeUnpin for Chapter
impl UnwindSafe for Chapter
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