pub enum Error {
Ffi(&'static str),
Parse(&'static str),
ParseError(ParseError),
Io(&'static str),
Alloc(&'static str),
Utf8(Utf8Error),
MutationWhileIterating,
TypeMismatch {
expected: &'static str,
got: &'static str,
},
DocumentMismatch,
ScalarTooLarge(usize),
}Expand description
Error type for fyaml operations.
Variants§
Ffi(&'static str)
FFI call returned an error or unexpected result.
Parse(&'static str)
YAML parsing failed (simple message, no location info).
ParseError(ParseError)
YAML parsing failed with detailed location information.
Io(&'static str)
I/O operation failed.
Alloc(&'static str)
Memory allocation failed.
Utf8(Utf8Error)
UTF-8 conversion failed.
MutationWhileIterating
Attempted to mutate document while iterators are active.
TypeMismatch
Operation requires a different node type.
DocumentMismatch
Nodes must belong to the same document.
ScalarTooLarge(usize)
Scalar length exceeds sanity limit.
Implementations§
Source§impl Error
impl Error
Sourcepub fn as_parse_error(&self) -> Option<&ParseError>
pub fn as_parse_error(&self) -> Option<&ParseError>
Returns the parse error details if this is a parse error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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> 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.