serde_yml::de

Enum Progress

Source
pub enum Progress<'de> {
    Str(&'de str),
    Slice(&'de [u8]),
    Read(Box<dyn Read + 'de>),
    Iterable(Loader<'de>),
    Document(Document<'de>),
    Fail(Arc<ErrorImpl>),
}
Expand description

Represents the progress of parsing a YAML document.

Variants§

§

Str(&'de str)

Indicates that the YAML input is a string slice.

The &'de str represents a borrowed string slice with a lifetime 'de.

§

Slice(&'de [u8])

Indicates that the YAML input is a byte slice.

The &'de [u8] represents a borrowed byte slice with a lifetime 'de.

§

Read(Box<dyn Read + 'de>)

Indicates that the YAML input is provided through a Read trait object.

The Box<dyn io::Read + 'de> represents a boxed trait object that implements the Read trait and has a lifetime 'de. This allows for reading the YAML input from various sources, such as files, network streams, or any other type that implements Read.

§

Iterable(Loader<'de>)

Indicates that the YAML input is provided through an iterator of Loader instances.

The Loader<'de> represents a YAML loader that iterates over the YAML documents. The 'de lifetime indicates the lifetime of the borrowed data within the loader.

§

Document(Document<'de>)

Indicates that the YAML input is a single Document instance.

The Document<'de> represents a parsed YAML document. The 'de lifetime indicates the lifetime of the borrowed data within the document.

§

Fail(Arc<ErrorImpl>)

Indicates that an error occurred during parsing.

The Arc<ErrorImpl> represents a reference-counted pointer to the error implementation. It allows for sharing the error across multiple owners without duplication.

Trait Implementations§

Source§

impl Debug for Progress<'_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'de> Freeze for Progress<'de>

§

impl<'de> !RefUnwindSafe for Progress<'de>

§

impl<'de> !Send for Progress<'de>

§

impl<'de> !Sync for Progress<'de>

§

impl<'de> Unpin for Progress<'de>

§

impl<'de> !UnwindSafe for Progress<'de>

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, 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.