pub enum MarkdownError {
PandocNotFound,
Spawn(Error),
Wait(Error),
PandocFailed {
stderr: String,
},
NonUtf8Output(FromUtf8Error),
Parse(ParseError),
}Expand description
Failure modes of markdown ingestion via pandoc.
A caller can branch MarkdownError::PandocNotFound (a setup /
environment problem the operator must fix) against the input-shaped
failures (MarkdownError::PandocFailed, MarkdownError::Parse,
…) that are attributable to the supplied body.
Variants§
PandocNotFound
pandoc is not on PATH. An environment/setup error, not a
problem with the input body.
Spawn(Error)
Spawning the pandoc child process failed for a reason other
than the binary being absent.
Wait(Error)
Waiting on the pandoc child process failed.
PandocFailed
pandoc exited non-zero. Carries the trimmed stderr for display.
NonUtf8Output(FromUtf8Error)
pandoc produced output that was not valid UTF-8.
Parse(ParseError)
The org text pandoc produced did not parse as a kb document.
Trait Implementations§
Source§impl Debug for MarkdownError
impl Debug for MarkdownError
Source§impl Display for MarkdownError
impl Display for MarkdownError
Source§impl Error for MarkdownError
impl Error for MarkdownError
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<FromUtf8Error> for MarkdownError
impl From<FromUtf8Error> for MarkdownError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<ParseError> for MarkdownError
impl From<ParseError> for MarkdownError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for MarkdownError
impl !UnwindSafe for MarkdownError
impl Freeze for MarkdownError
impl Send for MarkdownError
impl Sync for MarkdownError
impl Unpin for MarkdownError
impl UnsafeUnpin for MarkdownError
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.