pub enum TemplateParsingError {
NestedRepeatString(Vec<PathComponent>),
RepeatStringNotInArray(Vec<PathComponent>),
BadIndexForRepeatString(Vec<PathComponent>, usize),
MissingPlaceholderInRepeatedValue(Vec<PathComponent>),
MultipleRepeatString(Vec<PathComponent>, Vec<PathComponent>),
MultiplePlaceholderString(Vec<PathComponent>, Vec<PathComponent>),
MissingPlaceholderString,
BothArrayAndSingle {
single_path: Vec<PathComponent>,
path_to_array: Vec<PathComponent>,
array_to_placeholder: Vec<PathComponent>,
},
}Expand description
Error that occurs when trying to parse a template in ValueTemplate::new
Variants§
NestedRepeatString(Vec<PathComponent>)
A repeat string appears inside a repeated value
RepeatStringNotInArray(Vec<PathComponent>)
A repeat string appears outside of an array
BadIndexForRepeatString(Vec<PathComponent>, usize)
A repeat string appears in an array, but not in the second position
MissingPlaceholderInRepeatedValue(Vec<PathComponent>)
A repeated value lacks a placeholder
MultipleRepeatString(Vec<PathComponent>, Vec<PathComponent>)
Multiple repeat string appear in the template
MultiplePlaceholderString(Vec<PathComponent>, Vec<PathComponent>)
Multiple placeholder strings appear in the template
MissingPlaceholderString
No placeholder string appear in the template
BothArrayAndSingle
A placeholder appears both inside a repeated value and outside of it
Fields
§
single_path: Vec<PathComponent>Path to the single value
§
path_to_array: Vec<PathComponent>Path to the array of repeated values
§
array_to_placeholder: Vec<PathComponent>Path to placeholder inside each repeated value, starting from the array
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemplateParsingError
impl RefUnwindSafe for TemplateParsingError
impl Send for TemplateParsingError
impl Sync for TemplateParsingError
impl Unpin for TemplateParsingError
impl UnwindSafe for TemplateParsingError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more