Enum serde_yml::modules::error::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.