pub struct ScanError { /* private fields */ }Expand description
An error that occurred while reading, scanning, or parsing YAML.
Implementations§
Source§impl ScanError
impl ScanError
Sourcepub fn new(loc: Marker, message: impl Into<String>) -> ScanError
pub fn new(loc: Marker, message: impl Into<String>) -> ScanError
Create an externally supplied error from a location and message.
The message is stored in ErrorKind::Custom. This is useful for adapters that
participate in parser APIs, such as a custom ParserTrait
implementation or a ParserStack include resolver.
Sourcepub fn try_into_input_io_error(self) -> Result<InputIoError, Self>
pub fn try_into_input_io_error(self) -> Result<InputIoError, Self>
Extract the input I/O error details without cloning them.
§Errors
Returns the original scan error unchanged when it has a different error category.
Sourcepub fn source_stack(&self) -> &[String]
pub fn source_stack(&self) -> &[String]
Return source names captured by a parser stack, from bottom to top.
Trait Implementations§
impl Eq for ScanError
Source§impl Error for ScanError
impl Error for ScanError
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<E> From<ScanError> for TryLoadError<E>
impl<E> From<ScanError> for TryLoadError<E>
impl StructuralPartialEq for ScanError
Auto Trait Implementations§
impl !RefUnwindSafe for ScanError
impl !UnwindSafe for ScanError
impl Freeze for ScanError
impl Send for ScanError
impl Sync for ScanError
impl Unpin for ScanError
impl UnsafeUnpin for ScanError
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