pub enum ViewError {
TemplateNotFound(String),
RenderError(String),
ParseError(String),
SerializationError(String),
NotInitialized,
IoError(Error),
Tera(Error),
}Expand description
Error type for view/template operations
Variants§
TemplateNotFound(String)
Template not found
RenderError(String)
Template rendering failed
ParseError(String)
Template parsing failed
SerializationError(String)
Context serialization failed
NotInitialized
Template engine not initialized
IoError(Error)
IO error
Tera(Error)
Tera error
Implementations§
Source§impl ViewError
impl ViewError
Sourcepub fn render_error(msg: impl Into<String>) -> Self
pub fn render_error(msg: impl Into<String>) -> Self
Create a render error
Sourcepub fn parse_error(msg: impl Into<String>) -> Self
pub fn parse_error(msg: impl Into<String>) -> Self
Create a parse error
Sourcepub fn serialization_error(msg: impl Into<String>) -> Self
pub fn serialization_error(msg: impl Into<String>) -> Self
Create a serialization error
Trait Implementations§
Source§impl Error for ViewError
impl Error for ViewError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ViewError
impl !RefUnwindSafe for ViewError
impl Send for ViewError
impl Sync for ViewError
impl Unpin for ViewError
impl !UnwindSafe for ViewError
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
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP