#[non_exhaustive]pub enum TemplateError {
MissingParameter(String),
UnknownParameter(String),
InvalidParameter(String, String, String),
AlreadyRegistered(String),
InvalidBody(String),
SecurityRequired {
template_id: String,
detail: String,
},
NotFound(String),
}Expand description
Errors that can occur during template processing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingParameter(String)
UnknownParameter(String)
InvalidParameter(String, String, String)
A typed parameter was supplied a value that does not coerce to its
declared type (number/boolean). Carries the parameter name, the
declared type name, and the offending value.
AlreadyRegistered(String)
InvalidBody(String)
SecurityRequired
The materialized route declares a security policy but no authenticator was configured — fail-closed classification distinct from body errors.
NOTE: the message field is named detail, not source, because thiserror
auto-detects any field literally named source as the error source and
requires it to implement std::error::Error (a String does not).
NotFound(String)
The referenced template id was never defined.
Trait Implementations§
Source§impl Clone for TemplateError
impl Clone for TemplateError
Source§fn clone(&self) -> TemplateError
fn clone(&self) -> TemplateError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateError
impl Debug for TemplateError
Source§impl Display for TemplateError
impl Display for TemplateError
Source§impl Error for TemplateError
impl Error for TemplateError
1.30.0 · 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()
Source§impl From<TemplateError> for CamelError
impl From<TemplateError> for CamelError
Source§fn from(err: TemplateError) -> Self
fn from(err: TemplateError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TemplateError
impl RefUnwindSafe for TemplateError
impl Send for TemplateError
impl Sync for TemplateError
impl Unpin for TemplateError
impl UnsafeUnpin for TemplateError
impl UnwindSafe for TemplateError
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