pub enum DocumentError {
Show 13 variants
EmptyPath,
EmptyValues,
UnknownSegment {
path: String,
segment: String,
},
UnregisteredArray {
path: String,
},
SlugNotFound {
prefix: String,
slug: String,
},
SlugAlreadyExists {
prefix: String,
slug: String,
},
NotTraversable {
path: String,
got: String,
},
TypeMismatch {
path: String,
expected: String,
got: String,
hint: Option<String>,
},
PathNotFound {
path: String,
},
IndexOutOfBounds {
path: String,
index: usize,
len: usize,
},
ParseError {
format: String,
detail: String,
},
IoError {
detail: String,
},
UnsupportedOperation {
format: String,
operation: String,
detail: String,
},
}Variants§
EmptyPath
EmptyValues
UnknownSegment
UnregisteredArray
SlugNotFound
SlugAlreadyExists
NotTraversable
TypeMismatch
PathNotFound
IndexOutOfBounds
ParseError
IoError
UnsupportedOperation
Implementations§
Source§impl DocumentError
impl DocumentError
Sourcepub fn from_serde(path: impl Into<String>, err: impl Display) -> Self
pub fn from_serde(path: impl Into<String>, err: impl Display) -> Self
Wrap a serde deserialization failure as a TypeMismatch so callers that
do a read-modify-write cycle (set_path → serde round-trip) surface a
consistent error style rather than a raw serde message.
Trait Implementations§
Source§impl Clone for DocumentError
impl Clone for DocumentError
Source§fn clone(&self) -> DocumentError
fn clone(&self) -> DocumentError
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 DocumentError
impl Debug for DocumentError
Source§impl Display for DocumentError
impl Display for DocumentError
Source§impl Error for DocumentError
impl Error for DocumentError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for DocumentError
impl RefUnwindSafe for DocumentError
impl Send for DocumentError
impl Sync for DocumentError
impl Unpin for DocumentError
impl UnsafeUnpin for DocumentError
impl UnwindSafe for DocumentError
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