Struct handlebars::TemplateError
source · [−]pub struct TemplateError {
pub reason: TemplateErrorReason,
pub template_name: Option<String>,
pub line_no: Option<usize>,
pub column_no: Option<usize>,
/* private fields */
}
Expand description
Error on parsing template.
Fields
reason: TemplateErrorReason
template_name: Option<String>
line_no: Option<usize>
column_no: Option<usize>
Implementations
sourceimpl TemplateError
impl TemplateError
pub fn of(e: TemplateErrorReason) -> TemplateError
pub fn at(
self,
template_str: &str,
line_no: usize,
column_no: usize
) -> TemplateError
pub fn in_template(self, name: String) -> TemplateError
Trait Implementations
sourceimpl Debug for TemplateError
impl Debug for TemplateError
sourceimpl Display for TemplateError
impl Display for TemplateError
sourceimpl Error for TemplateError
impl Error for TemplateError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<TemplateError> for TemplateFileError
impl From<TemplateError> for TemplateFileError
sourcefn from(err: TemplateError) -> TemplateFileError
fn from(err: TemplateError) -> TemplateFileError
Performs the conversion.
sourceimpl From<TemplateError> for TemplateRenderError
impl From<TemplateError> for TemplateRenderError
sourcefn from(err: TemplateError) -> TemplateRenderError
fn from(err: TemplateError) -> TemplateRenderError
Performs the conversion.
sourceimpl PartialEq<TemplateError> for TemplateError
impl PartialEq<TemplateError> for TemplateError
sourcefn eq(&self, other: &TemplateError) -> bool
fn eq(&self, other: &TemplateError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TemplateError) -> bool
fn ne(&self, other: &TemplateError) -> bool
This method tests for !=
.
impl StructuralPartialEq for TemplateError
Auto Trait Implementations
impl RefUnwindSafe for TemplateError
impl Send for TemplateError
impl Sync for TemplateError
impl Unpin for TemplateError
impl UnwindSafe for TemplateError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more