#[non_exhaustive]pub enum TemplateError {
Invalid(TemplateFault),
MissingNumber,
MissingTime,
}Expand description
Why substitute could not render a URL.
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.
Invalid(TemplateFault)
The template is invalid; the Representation is dropped.
MissingNumber
The template contains $Number$ but no number was supplied.
MissingTime
The template contains $Time$ but no time was supplied.
Implementations§
Source§impl TemplateError
impl TemplateError
Sourcepub fn fault(self) -> TemplateFault
pub fn fault(self) -> TemplateFault
The TemplateFault behind TemplateError::Invalid; a missing value
is reported as TemplateFault::MissingNumberOrTime, which is where
5.3.9.4.4 leaves a template the caller cannot render.
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 moreimpl Copy for TemplateError
Source§impl Debug for TemplateError
impl Debug for TemplateError
Source§impl Display for TemplateError
impl Display for TemplateError
impl Eq for TemplateError
Source§impl PartialEq for TemplateError
impl PartialEq for TemplateError
impl StructuralPartialEq for TemplateError
Auto Trait Implementations§
impl Forget for TemplateError
impl Freeze for TemplateError
impl Move 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