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.