pub struct BibleDataFormatError { /* private fields */ }Expand description
A path-aware violation of the serialized Bible content contract.
Implementations§
Source§impl BibleDataFormatError
impl BibleDataFormatError
Sourcepub fn new(
code: BibleDataFormatErrorCode,
path: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn new( code: BibleDataFormatErrorCode, path: impl Into<String>, message: impl Into<String>, ) -> Self
Construct an error without an offending value.
Sourcepub fn with_value(self, value: Value) -> Self
pub fn with_value(self, value: Value) -> Self
Attach the offending JSON value.
Sourcepub fn with_cause<E>(self, cause: E) -> Self
pub fn with_cause<E>(self, cause: E) -> Self
Attach the underlying error while preserving its concrete type.
Sourcepub const fn code(&self) -> BibleDataFormatErrorCode
pub const fn code(&self) -> BibleDataFormatErrorCode
Return the stable machine-readable code.
Trait Implementations§
Source§impl Clone for BibleDataFormatError
impl Clone for BibleDataFormatError
Source§fn clone(&self) -> BibleDataFormatError
fn clone(&self) -> BibleDataFormatError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BibleDataFormatError
impl Debug for BibleDataFormatError
Source§impl Display for BibleDataFormatError
impl Display for BibleDataFormatError
Source§impl Error for BibleDataFormatError
impl Error for BibleDataFormatError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for BibleDataFormatError
impl PartialEq for BibleDataFormatError
impl StructuralPartialEq for BibleDataFormatError
Auto Trait Implementations§
impl !RefUnwindSafe for BibleDataFormatError
impl !UnwindSafe for BibleDataFormatError
impl Freeze for BibleDataFormatError
impl Send for BibleDataFormatError
impl Sync for BibleDataFormatError
impl Unpin for BibleDataFormatError
impl UnsafeUnpin for BibleDataFormatError
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