pub enum Error<E, R> {
Syntax(SyntaxError<E>),
Render(R),
IO(Error),
Fmt(Error),
}Expand description
A general error type capturing any error which could occur while compiling or rendering a template string.
This error type is used by the Oneshot render methods, though it could also
be useful for handling any error which might occur in this crate since it implements From<T>
for the following types T:
Variants§
Syntax(SyntaxError<E>)
An error when compiling the template string.
Render(R)
A value in an expression could not be rendered.
IO(Error)
An error occured while writing to an io::Write.
Fmt(Error)
An error occured while writing to a fmt::Write.
Trait Implementations§
Source§impl<E, R> From<FmtRenderError<R>> for Error<E, R>
impl<E, R> From<FmtRenderError<R>> for Error<E, R>
Source§fn from(err: FmtRenderError<R>) -> Self
fn from(err: FmtRenderError<R>) -> Self
Converts to this type from the input type.
Source§impl<E, R> From<IORenderError<R>> for Error<E, R>
impl<E, R> From<IORenderError<R>> for Error<E, R>
Source§fn from(err: IORenderError<R>) -> Self
fn from(err: IORenderError<R>) -> Self
Converts to this type from the input type.
Source§impl<E, R> From<SyntaxError<E>> for Error<E, R>
impl<E, R> From<SyntaxError<E>> for Error<E, R>
Source§fn from(err: SyntaxError<E>) -> Self
fn from(err: SyntaxError<E>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E, R> Freeze for Error<E, R>
impl<E, R> !RefUnwindSafe for Error<E, R>
impl<E, R> Send for Error<E, R>
impl<E, R> Sync for Error<E, R>
impl<E, R> Unpin for Error<E, R>
impl<E, R> !UnwindSafe for Error<E, R>
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
Mutably borrows from an owned value. Read more