#[non_exhaustive]pub enum BindingError {
Syntax {
part: String,
message: String,
},
TemplateInOpaqueElement {
part: String,
element: String,
offset: usize,
},
TagSharesContainer {
part: String,
container: &'static str,
span: Range<usize>,
},
BodyCrossesContainer {
part: String,
open: Vec<usize>,
close: Vec<usize>,
},
LoopWrapsTable {
part: String,
span: Range<usize>,
},
UnsupportedInlineLoop {
part: String,
path: Vec<usize>,
},
MultipleTagsInBlock {
part: String,
path: Vec<usize>,
first: Range<usize>,
second: Range<usize>,
},
UnclosedBlock {
part: String,
span: Range<usize>,
},
UnexpectedTag {
part: String,
span: Range<usize>,
},
MismatchedBlock {
part: String,
open: Range<usize>,
close: Range<usize>,
},
}Expand description
An error raised while binding.
Every variant names the part and the block it came from, so a caller can match the cause without parsing the message.
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.
Syntax
The template syntax could not be parsed.
TemplateInOpaqueElement
A template delimiter was found inside an element the model does not type.
Fields
A structural tag shares its paragraph with other text.
BodyCrossesContainer
A block opens in one container and closes in another.
Fields
LoopWrapsTable
A loop body wraps a whole table.
UnsupportedInlineLoop
An inline loop appears outside a table row.
MultipleTagsInBlock
A paragraph holds two structural tags.
Fields
UnclosedBlock
A block was opened and never closed.
UnexpectedTag
A closing tag has no opening tag.
MismatchedBlock
A closing tag does not match the open block.
Trait Implementations§
Source§impl Clone for BindingError
impl Clone for BindingError
Source§impl Debug for BindingError
impl Debug for BindingError
Source§impl Display for BindingError
impl Display for BindingError
impl Eq for BindingError
Source§impl Error for BindingError
impl Error for BindingError
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<BindingError> for Error
impl From<BindingError> for Error
Source§fn from(source: BindingError) -> Self
fn from(source: BindingError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BindingError
impl PartialEq for BindingError
impl StructuralPartialEq for BindingError
Auto Trait Implementations§
impl Forget for BindingError
impl Freeze for BindingError
impl Move for BindingError
impl RefUnwindSafe for BindingError
impl Send for BindingError
impl Sync for BindingErrorwhere
RawVecInner: Sync,
impl Unpin for BindingError
impl UnsafeUnpin for BindingErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
impl UnwindSafe for BindingError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.