pub struct VerseRef { /* private fields */ }Expand description
A single Bible verse coordinate.
Implementations§
Source§impl VerseRef
impl VerseRef
Sourcepub const fn new(
book: Book,
chapter: u16,
verse: u16,
) -> Result<VerseRef, CoordinateError>
pub const fn new( book: Book, chapter: u16, verse: u16, ) -> Result<VerseRef, CoordinateError>
Construct a validated verse coordinate.
Sourcepub fn parse_with_language(
input: &str,
language: Language,
) -> Result<VerseRef, ParseError>
pub fn parse_with_language( input: &str, language: Language, ) -> Result<VerseRef, ParseError>
Parse a verse with an optional explicit book-name language.
Sourcepub fn try_parse(input: &str) -> Option<VerseRef>
pub fn try_parse(input: &str) -> Option<VerseRef>
Parse a verse, returning None instead of an error for invalid input.
Sourcepub fn try_parse_with_language(
input: &str,
language: Language,
) -> Option<VerseRef>
pub fn try_parse_with_language( input: &str, language: Language, ) -> Option<VerseRef>
Parse a verse with an explicit language, returning None for invalid
input.
Sourcepub const fn with_chapter(
self,
chapter: u16,
) -> Result<VerseRef, CoordinateError>
pub const fn with_chapter( self, chapter: u16, ) -> Result<VerseRef, CoordinateError>
Return a validated copy with a different chapter.
Sourcepub const fn with_verse(self, verse: u16) -> Result<VerseRef, CoordinateError>
pub const fn with_verse(self, verse: u16) -> Result<VerseRef, CoordinateError>
Return a validated copy with a different verse.
Trait Implementations§
impl Copy for VerseRef
impl Eq for VerseRef
Source§impl MachineIdentifiers for VerseRef
impl MachineIdentifiers for VerseRef
Source§fn osis_identifier(&self) -> String
fn osis_identifier(&self) -> String
Encode this value as a case-sensitive OSIS identifier.
Source§fn usfm_identifier(&self) -> String
fn usfm_identifier(&self) -> String
Encode this value as a case-sensitive USFM identifier.
Source§impl Ord for VerseRef
impl Ord for VerseRef
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for VerseRef
impl PartialOrd for VerseRef
impl StructuralPartialEq for VerseRef
Auto Trait Implementations§
impl Freeze for VerseRef
impl RefUnwindSafe for VerseRef
impl Send for VerseRef
impl Sync for VerseRef
impl Unpin for VerseRef
impl UnsafeUnpin for VerseRef
impl UnwindSafe for VerseRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.