serde_yml::modules::error

Enum ErrorImpl

Source
pub enum ErrorImpl {
Show 18 variants Message(String, Option<Pos>), Libyml(Error), IoError(Error), FromUtf8(FromUtf8Error), EndOfStream, MoreThanOneDocument, RecursionLimitExceeded(Mark), RepetitionLimitExceeded, BytesUnsupported, UnknownAnchor(Mark), SerializeNestedEnum, ScalarInMerge, TaggedInMerge, ScalarInMergeElement, SequenceInMergeElement, EmptyTag, FailedToParseNumber, Shared(Arc<ErrorImpl>),
}
Expand description

The internal representation of an error.

This enum represents various errors that can occur during YAML serialization or deserialization, including I/O errors, UTF-8 conversion errors, and errors originating from the libyml library.

Variants§

§

Message(String, Option<Pos>)

A generic error message with an optional position.

§

Libyml(Error)

An error originating from the libyml library.

§

IoError(Error)

An I/O error.

§

FromUtf8(FromUtf8Error)

An error encountered while converting a byte slice to a string using UTF-8 encoding.

§

EndOfStream

An error indicating that the end of the YAML stream was reached unexpectedly.

§

MoreThanOneDocument

An error indicating that more than one YAML document was encountered.

§

RecursionLimitExceeded(Mark)

An error indicating that the recursion limit was exceeded.

§

RepetitionLimitExceeded

An error indicating that the repetition limit was exceeded.

§

BytesUnsupported

An error indicating that byte-based YAML is unsupported.

§

UnknownAnchor(Mark)

An error indicating that an unknown anchor was encountered.

§

SerializeNestedEnum

An error indicating that serializing a nested enum is not supported.

§

ScalarInMerge

An error indicating that a scalar value was encountered in a merge operation.

§

TaggedInMerge

An error indicating that a tagged value was encountered in a merge operation.

§

ScalarInMergeElement

An error indicating that a scalar value was encountered in a merge element.

§

SequenceInMergeElement

An error indicating that a sequence was encountered in a merge element.

§

EmptyTag

An error indicating that an empty tag was encountered.

§

FailedToParseNumber

An error indicating that parsing a number failed.

§

Shared(Arc<ErrorImpl>)

A shared error implementation.

Trait Implementations§

Source§

impl Debug for ErrorImpl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ErrorImpl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.