pub enum Error {
Show 15 variants
Json(Error),
Io(Error),
InvalidUtf8(Utf8Error),
BinaryFormat(String),
UnsupportedFormat(String),
FormatNotEnabled(String),
UnknownExtension(String),
UnsupportedExtension {
extension: String,
format: String,
},
InvalidMetadata(String),
Template(String),
Unrepresentable(String),
OutputTooLarge,
Container(String),
Filter(String),
Highlight(String),
}Expand description
The error type returned across the conversion pipeline.
Variants§
Json(Error)
serde only.JSON input or output could not be (de)serialized.
Io(Error)
An I/O operation failed.
InvalidUtf8(Utf8Error)
Input handed to a text reader was not valid UTF-8.
BinaryFormat(String)
A text-only API was asked for a format whose output is binary; use the byte-capable API.
UnsupportedFormat(String)
The named format is not recognized.
FormatNotEnabled(String)
The named format is recognized but not compiled into this build.
UnknownExtension(String)
A +/- toggle named an extension that is not modeled.
UnsupportedExtension
A modeled extension does not apply to the given format.
Fields
InvalidMetadata(String)
Document metadata could not be parsed.
Template(String)
A standalone template failed to parse or render.
Unrepresentable(String)
The document holds content the target format cannot represent.
OutputTooLarge
Rendering the document would produce output out of all proportion to its size, which only nesting a self-multiplying construct (a table inside a table cell) can cause.
Container(String)
Building or reading a container archive failed.
Filter(String)
A document filter failed to run or returned an unusable result.
Highlight(String)
highlight only.A syntax-highlighting style or definition could not be resolved.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<TemplateError> for Error
Available on crate feature template only.
impl From<TemplateError> for Error
template only.Source§fn from(error: TemplateError) -> Self
fn from(error: TemplateError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more